[wp-trac] [WordPress Trac] #30518: WP_Dependencies::recurse_deps can recurse infinitely

WordPress Trac noreply at wordpress.org
Mon Mar 30 15:53:21 UTC 2015


#30518: WP_Dependencies::recurse_deps can recurse infinitely
----------------------------------------+------------------------------
 Reporter:  ccomp5950                   |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Script Loader               |     Version:  4.0
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:  performance
----------------------------------------+------------------------------
Changes (by boonebgorges):

 * keywords:  has-patch => has-patch needs-unit-tests


Comment:

 Thanks for the report. Using a depth counter like this seems like a sorta
 hackish workaround that has the potential to cause problems with
 legitimately complex dependencies. How about doing some actual loop
 detection? Like maybe `recurse_deps()` should accept a third param that is
 a flat array of unique handles identified in the tree, and then if it
 detects that you're looking at a handle that's already been recursed, it
 will bail?

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


More information about the wp-trac mailing list