The error_log file size of my site has been very large. So that it fills the entire server space. The last error in this file:
[06-Jul-2019 13:22:21 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 [06-Jul-2019 13:22:21 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/mysite/public_html/wp-includes/class-wp-hook.php on line 277 [06-Jul-2019 13:22:21 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 [06-Jul-2019 13:22:21 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 [06-Jul-2019 13:22:21 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/mysite/public_html/wp-includes/class-wp-hook.php on line 277 [06-Jul-2019 13:22:21 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 [06-Jul-2019 13:22:21 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 [06-Jul-2019 13:22:21 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/mysite/public_html/wp-includes/class-wp-hook.php on line 277 [06-Jul-2019 13:22:21 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 291Someone can help me. What is the problem? (The latest changes we have made on the site: We have used the ACF plugin for add custom fields.)
asked Jul 6, 2019 at 17:00
2
Turn off the debug error loggins with this command in the wp-config.php file:
The errors you are seeing are 'warning' (I think of them as 'benign') and have to do with coding practices not allowing for empty 'loop' variables.
You only want the WP_DEBUG to be true on development systems.
If the errors still show up, then look for that setting in the PHP ini file, or in theme or plugin functions.
answered Jul 6, 2019 at 19:16
Rick HellewellRick Hellewell
6,3002 gold badges17 silver badges36 bronze badges
2
Not the answer you're looking for? Browse other questions tagged errors or ask your own question.
Sometimes the WordPress error log file will create huge headache for some users since it creates huge file in some cases. It will sometimes affect the hosting too if you have only less space in your server. In order to avoid logging of error, please add the following code in your wp-config.php file. Add the code below
define(‘WP_DEBUG’, false); line. Done, no more error logging now. This article was last modified on March 15, 2016
Vipin is the founder and editor of TechRounder. He started his career as a software developer in 2011 and turned towards full-time blogging in 2021. He has a passion for writing on technology, social media, cybersecurity, artificial intelligence, virtual reality, etc. You can contact him via email
Should periodically clear/delete these 2 log files:
/wp-content/uploads/sucuri/sucuri-auditqueue.php /wp-content/uploads/sucuri/sucuri-oldfailedlogins.phpSince sucuri seems to load them anywhere in wp-admin – when they get very big = causes memory_limit exceeded errors:
PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 4096 bytes) in /home/aaa/public_html/wp-includes/class-wp-recovery-mode.php on line 363 PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 4096 bytes) in /home/aaa/public_html/wp-content/plugins/sucuri-scanner/src/cache.lib.php on line 260At the moment forced to set cron task / delete manually, which is inconvenient for large number of sites.