[wp-trac] [WordPress Trac] #57122: `wp_nav_menu()` throws undefined offset if a menu item's parent has a higher ID.

WordPress Trac noreply at wordpress.org
Tue Feb 14 03:31:13 UTC 2023


#57122: `wp_nav_menu()` throws undefined offset if a menu item's parent has a
higher ID.
--------------------------------------+----------------------------
 Reporter:  peterwilsoncc             |       Owner:  peterwilsoncc
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  6.2
Component:  Menus                     |     Version:  6.1
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+----------------------------
Changes (by peterwilsoncc):

 * owner:  (none) => peterwilsoncc
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"55328" 55328]:
 {{{
 #!CommitTicketReference repository="" revision="55328"
 Menus: Test creating parent after a child doesn't throw an error.

 As menus are re-arranged, it's possible a menu item was created prior to
 its parent.

 This introduces a test to ensure the order in which menu items are created
 relevant to their parents does not trigger errors.

 Props costdev, peterwilsoncc.
 Fixes #57122.
 }}}

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


More information about the wp-trac mailing list