[wp-trac] [WordPress Trac] #56926: Infinite loop in wp_nav_menu

WordPress Trac noreply at wordpress.org
Fri Dec 16 03:55:26 UTC 2022


#56926: Infinite loop in wp_nav_menu
-------------------------------------------------+-------------------------
 Reporter:  david.binda                          |       Owner:
                                                 |  hellofromTonya
     Type:  defect (bug)                         |      Status:  reopened
 Priority:  normal                               |   Milestone:  6.1.2
Component:  Menus                                |     Version:  6.1
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests fixed-      |     Focuses:
  major                                          |
-------------------------------------------------+-------------------------

Comment (by peterwilsoncc):

 In the newly [https://github.com/WordPress/wordpress-develop/pull/3773
 linked pull request]:

 * Account for the legacy format filter by applying default values for the
 `$args` and `$depth` parameters
 * If these values are not supplied (the filter is called in legacy mode)
 the new function does nothing as it has no idea what the maximum and
 current depths are.
 * See the
 [https://gist.github.com/peterwilsoncc/1bb787ba77c53a13c7017645c84834c8
 testing mu-plugin] I've put together -- it's rough but will help
 demonstrate the error on 2013

 I'll add some test with class to apply_filters in legacy mode.

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


More information about the wp-trac mailing list