[wp-trac] [WordPress Trac] #39338: class-wp-hook.php - apply_filters() infinite loop

WordPress Trac noreply at wordpress.org
Tue Jan 29 20:32:28 UTC 2019


#39338: class-wp-hook.php - apply_filters() infinite loop
--------------------------+-----------------------------
 Reporter:  frettled      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  Plugins       |     Version:  4.7
 Severity:  critical      |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------------

Comment (by trongn):

 Hi,

 I believe fix all relevant loops in class-wp-hook.php as below will help.
 Please read my previous comment for more details.

 {{{
 } while ( is_array( $this->iterations[ $nesting_level ] ) && false !==
 next( $this->iterations[ $nesting_level ] ) );
 }}}

 Cheers


 Replying to [comment:53 jdw0203]:
 > Hi,
 > I'm managing at least 4 sites which are all affected by this issue. Each
 of the 4 sites are wordpress, running Divi theme with Woocommerce and a
 number of other plugins installed. All are almost identical in terms of
 the plugins used on each. All are sitting on shared hosting servers.
 >
 > The first 6 lines of the error log are:
 >
 > {{{
 >
 > [24-Jan-2019 16:43:20 UTC] PHP Warning:  array_keys() expects parameter
 1 to be array, integer given in /home/mysite/public_html/wp-includes
 /class-wp-hook.php on line 271
 > [24-Jan-2019 16:43:20 UTC] PHP Warning:  current() expects parameter 1
 to be array, null given in /home/mysite/public_html/wp-includes/class-wp-
 hook.php on line 275
 > [24-Jan-2019 16:43:20 UTC] PHP Warning:  Invalid argument supplied for
 foreach() in /home/mysite/public_html/wp-includes/class-wp-hook.php on
 line 277
 > [24-Jan-2019 16:43:20 UTC] PHP Warning:  next() expects parameter 1 to
 be array, null given in /home/mysite/public_html/wp-includes/class-wp-
 hook.php on line 291
 > [24-Jan-2019 16:43:20 UTC] PHP Warning:  current() expects parameter 1
 to be array, null given in /home/mysite/public_html/wp-includes/class-wp-
 hook.php on line 275
 > [24-Jan-2019 16:43:20 UTC] PHP Warning:  Invalid argument supplied for
 foreach() in /home/mysite/public_html/wp-includes/class-wp-hook.php on
 line 277
 > }}}
 >
 > The last 3 lines shown above infinitely repeat themselves until the
 error log grows to a large file size, which then maxes out the disk space
 available on each hosting service.
 >
 > I've been experiencing this with all 4 sites since early December, when
 the last major Wordpress update rollout occurred.
 >
 > Is anyone willing and able to help debug this issue?
 >
 > Desperately seeking assistance with this pain in the behind issue.
 >
 > Cheers

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


More information about the wp-trac mailing list