[wp-trac] [WordPress Trac] #17821: wp_get_nav_menu_object() doesn't check when passing to get_term()
WordPress Trac
wp-trac at lists.automattic.com
Fri Jun 17 00:08:21 UTC 2011
#17821: wp_get_nav_menu_object() doesn't check when passing to get_term()
--------------------------+------------------------------
Reporter: kawauso | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Menus | Version: 3.1.4
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+------------------------------
Comment (by kawauso):
Patch sets `$menu_obj` to false initially and removes the redundant end
false check (`get_term_by()` will return an object or false, if
`get_term()` has passed null then it causes a `get_term_by()` call). Also
adds an `is_numeric()` check to `get_term()`.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17821#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list