This could simply be a plugin or theme conflict. Please attempt to disable all plugins, and switch to the default Twenty Nineteen theme. If the problem goes away, enable them one by one to identify the source of the problem.
it actually already error even before i update the theme. I already disable my plugin, but no difference..
Ok, and do you still have the problem with all plugins deactivated and the Twenty Nineteen theme active?
i have deleted the error log file this morning and now everything works okay, no error with the situation i have disable all of my plugin except woocommerce, and still using my theme.
I will change my theme into twenty nineteen and see if there’s any error, but i think i have to wait until next morning to see if the error_log file back again.. I will update it tomorrow.
Thank you for your reply James Huff,
Hi james, I already change my theme into twenty nineteen and disable all of my plugins, but nothing works, the error_log keeps coming, i try to disable the error log by putting this code on my htaccess
php_flag log_errors Off
but nothing’s change. The error still coming.. Any suggestion??
Maybe is this issue: https://core.trac.wordpress.org/ticket/39338
Could you report there?
I’m not sure it’s a coincidence, as this happened to a few of my customers all of a sudden too. No core/plugin/theme changes whatsoever, and in the last few days, 6-7 WordPress sites had 30+GB error_log files, all showing the same:
[12-Jul-2019 11:50:59 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/neadiatr/public_html/wp-includes/class-wp-hook.php on line 277
[12-Jul-2019 11:50:59 UTC] PHP Warning: next() expects parameter 1 to be array, null given in /home/neadiatr/public_html/wp-includes/class-wp-hook.php on line 291
[12-Jul-2019 11:50:59 UTC] PHP Warning: current() expects parameter 1 to be array, null given in /home/neadiatr/public_html/wp-includes/class-wp-hook.php on line 275
[12-Jul-2019 11:50:59 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/neadiatr/public_html/wp-includes/class-wp-hook.php on line 277
[12-Jul-2019 11:50:59 UTC] PHP Warning: next() expects parameter 1 to be array, null given in /home/neadiatr/public_html/wp-includes/class-wp-hook.php on line 291
[12-Jul-2019 11:50:59 UTC] PHP Warning: current() expects parameter 1 to be array, null given in /home/neadiatr/public_html/wp-includes/class-wp-hook.php on line 275
The error started showing up on its own and stopped on its own as well. Besides deleting the error_log I didn’t do anything to “fix” it.
Could it be caused by some 3rd party WordPress service going down or something?
Last time it happened, around 6 months ago, again, it happened to a few websites without any reason and was auto-resolved. Around the same days, there were similar reports here and trac.
This is happening to me as well, on numerous sites.
[21-Jul-2019 11:33:59 UTC] PHP Warning: current() expects parameter 1 to be array, null given in /home/natvstudio/public_html/wp-includes/class-wp-hook.php on line 275
[21-Jul-2019 11:33:59 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/natvstudio/public_html/wp-includes/class-wp-hook.php on line 277
[21-Jul-2019 11:33:59 UTC] PHP Warning: next() expects parameter 1 to be array, null given in /home/natvstudio/public_html/wp-includes/class-wp-hook.php on line 291
[21-Jul-2019 11:33:59 UTC] PHP Warning: current() expects parameter 1 to be array, null given in /home/natvstudio/public_html/wp-includes/class-wp-hook.php on line 275
[21-Jul-2019 11:33:59 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/natvstudio/public_html/wp-includes/class-wp-hook.php on line 277
[21-Jul-2019 11:33:59 UTC] PHP Warning: next() expects parameter 1 to be array, null given in /home/natvstudio/public_html/wp-includes/class-wp-hook.php on line 291
@webdesignbymark I understand you’re running cPanel. Are you also running LiteSpeed webserver?
@George Tasioulis – Yes I’m running LiteSpeed on this particular website hosted at Veerotech. But I’m also having the same issue with a website I have hosted at Siteground which isn’t LiteSpeed.
Thanks, I’m also running LiteSpeed webserver with the LiteSpeed Cache plugin, and have yet only experienced it on servers with this configuration, so I wanted to double-check. Since you’re experiencing the same on a non-LiteSpeed server, then I guess it’s unrelated.
This problem didn’t start happening until the last few weeks or so. My guess is that it has to do with WP Version 5.2.
@georgetasioulis
As a follow-up. I contacted support at SiteGround hosting. They optimized the database, which had grown to over 8gb, and it reduced the size to 65mb. It appears it was the same problem though, a huge increase in the error_log file coming from the class-wp-hook.php.
So at least my sites are up and running right now but, I’m seriously paranoid considering I’ve had over half a dozen sites already go down because of this issue. The support staff said they see a similar issue about 3-4 years ago. And it was caused by the WP core files. Hopefully, WordPress core team will fix the problem soon.
We have been experiencing same issue on multiple sites. Any update on this?
For what it’s worth, sites are running on litespeed as well.