[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:02:14 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        |   Keywords:  has-patch
--------------------------+-----------------------------
 `wp_get_nav_menu_object()` initially passes the menu string to
 `get_term()` to see if it's an ID. However, `get_term()` expects an
 integer or object and type-casts any non-objects passed into integers.
 This results in a menu name i.e. '10-ton elephant' being reduced to '10',
 which it then uses as a term ID, potentially producing unexpected results.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17821>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list