[wp-trac] [WordPress Trac] #17821: wp_get_nav_menu_object() doesn't check when passing to get_term()

WordPress Trac noreply at wordpress.org
Mon Jan 19 18:16:32 UTC 2015


#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:  Future Release
Component:  Menus         |     Version:  3.1.4
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------------

Comment (by xandanet):

 Ran across this again in 4.0.1. Can anyone verify?

 I worked around the unexpected behaviour by skipping straight to:
 {{{
 get_term_by( 'name', $menu_title, 'nav_menu' );
 }}}
 instead, from my plugin code.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/17821#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list