[wp-trac] [WordPress Trac] #57169: Prevent saving of invalid menu_item_parent

WordPress Trac noreply at wordpress.org
Tue Jan 10 14:42:06 UTC 2023


#57169: Prevent saving of invalid menu_item_parent
--------------------------+-----------------------
 Reporter:  azaozz        |       Owner:  azaozz
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  6.1.2
Component:  Menus         |     Version:  6.1
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------

Comment (by Chrystl):

 @azaozz, just to let you know that with WordPress 6.2-alpha, the issue is
 solved when replacing


 {{{
 if ( (int) $menu_item->ID === (int) $menu_item->menu_item_parent ) {
 }}}


 by


 {{{
 if ( (string) $menu_item->ID === (string) $menu_item->menu_item_parent ) {
 }}}


 in /wp-includes/nav-menu-template.php at L202

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


More information about the wp-trac mailing list