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

WordPress Trac noreply at wordpress.org
Thu Jan 10 07:41:51 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:  needs-patch   |     Focuses:
--------------------------+-----------------------------

Comment (by dangergirl42):

 hi there,

 we are getting the same messages and it lead me to this thread:

 [10-Jan-2019 04:32:53 UTC] PHP Warning:  next() expects parameter 1 to be
 array, null given in /home/argylelo/public_html/wp-includes/class-wp-
 hook.php on line 291
 [10-Jan-2019 04:32:53 UTC] PHP Warning:  current() expects parameter 1 to
 be array, null given in /home/argylelo/public_html/wp-includes/class-wp-
 hook.php on line 275
 [10-Jan-2019 04:32:53 UTC] PHP Warning:  Invalid argument supplied for
 foreach() in /home/argylelo/public_html/wp-includes/class-wp-hook.php on
 line 277

 Just to clarify before I have a go - I change this on line 291:

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

 to

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

 Is that right?
 And can I change it back if it does not work, or do you change the way
 WordPress functions just by trying this? - sorry I am not clear on all
 this stuff and want to check first...

 I've tried disabling all the plugins etc, but the log keeps growing to
 around 49GB per day regardless. PHP version is 5.6.39 - WordPress is
 5.0.3–en_AU. not sure when it started but I noticed the size a few days
 ago when the website had no space or memory left to run. I/O Usage and CP
 usage consistently in red, appreciate assistance thank you!

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


More information about the wp-trac mailing list