Enfold 4.5, Ubuntu 18.04, Plesk 17.8 MU32, PHP 7.2 FPM
Plugins: WPML,Wordfence, Updraft,Yoast.
Every few seconds in get this warning in var/log/plesk-php7.2-fpm./error.log
[26-Nov-2018 01:46:15] WARNING: [pool block-optic.com] child 32083 said into stderr: “NOTICE: PHP message: PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/block-optic.com/httpdocs/wp-content/themes/enfold/includes/helper-assets.php on line 329″
everything works but this message writes my log full
Thanx for Help in advance!
Hey paul24com,
You can add this code to that file on line 329:
if (!isset($posts) || is_array($posts)) {
return $used;
}
Best regards,
Victoria
Dear Victoria, it seems to have worked.
No more warning entries in log so far.
Will this change be overwritten during an Enfold update?
Thank you very much for your help!!!
Hi paul24com,
Yes, it will be lost on update. You can configure logging to suppress warnings if you want.
Best regards,
Victoria
Hi,
I’m still getting these messages on 4.5.5.
Was this addressed in a recent update? I’m using a child theme, do I need to do anything to make this go away? It’s filling my logs up.
Thanks,
Paul.
Hi paulcline,
Please open a new thread and include admin login details in private so that we can have a closer look at your site.
Best regards,
Rikard