PHP 7.2 > Invalid argument supplied for foreach()
-
Issue
I’ve tried to upgrade my website to PHP 7.2, but got allot of warnings wit ‘Invalid argument supplied for foreach()’. This happens in several classes, as seen in my Logs:
[28-Feb-2019 07:58:02 UTC] PHP 1. {main}() \path\to\project\wp-admin\index.php:0 [28-Feb-2019 07:58:02 UTC] PHP 2. require_once() \path\to\project\wp-admin\index.php:10 [28-Feb-2019 07:58:02 UTC] PHP 3. do_action() \path\to\project\wp-admin\admin.php:253 [28-Feb-2019 07:58:02 UTC] PHP 4. WP_Hook->do_action() \path\to\project\wp-includes\plugin.php:465 [28-Feb-2019 07:58:02 UTC] PHP 5. WP_Hook->apply_filters() \path\to\project\wp-includes\class-wp-hook.php:310 [28-Feb-2019 07:58:02 UTC] PHP 6. WP_Piwik\Admin\Statistics->show() \path\to\project\wp-includes\class-wp-hook.php:286 [28-Feb-2019 07:58:02 UTC] PHP 7. do_meta_boxes() \path\to\project\wp-content\plugins\wp-piwik\classes\WP_Piwik\Admin\Statistics.php:31 [28-Feb-2019 07:58:02 UTC] PHP 8. WP_Piwik\Widget\Pages->show() \path\to\project\wp-admin\includes\template.php:1306 [28-Feb-2019 07:58:02 UTC] PHP Warning: Invalid argument supplied for foreach() in \path\to\project\wp-content\plugins\wp-piwik\classes\WP_Piwik\Widget.php on line 109 [28-Feb-2019 07:58:02 UTC] PHP Stack trace: [28-Feb-2019 07:58:02 UTC] PHP 1. {main}() \path\to\project\wp-admin\index.php:0 [28-Feb-2019 07:58:02 UTC] PHP 2. require_once() \path\to\project\wp-admin\index.php:10 [28-Feb-2019 07:58:02 UTC] PHP 3. do_action() \path\to\project\wp-admin\admin.php:253 [28-Feb-2019 07:58:02 UTC] PHP 4. WP_Hook->do_action() \path\to\project\wp-includes\plugin.php:465 [28-Feb-2019 07:58:02 UTC] PHP 5. WP_Hook->apply_filters() \path\to\project\wp-includes\class-wp-hook.php:310 [28-Feb-2019 07:58:02 UTC] PHP 6. WP_Piwik\Admin\Statistics->show() \path\to\project\wp-includes\class-wp-hook.php:286 [28-Feb-2019 07:58:02 UTC] PHP 7. do_meta_boxes() \path\to\project\wp-content\plugins\wp-piwik\classes\WP_Piwik\Admin\Statistics.php:31 [28-Feb-2019 07:58:02 UTC] PHP 8. WP_Piwik\Widget\Keywords->show() \path\to\project\wp-admin\includes\template.php:1306 [28-Feb-2019 07:58:02 UTC] PHP Warning: Invalid argument supplied for foreach() in \path\to\project\wp-content\plugins\wp-piwik\classes\WP_Piwik\Widget.php on line 109 [28-Feb-2019 07:58:02 UTC] PHP Stack trace: [28-Feb-2019 07:58:02 UTC] PHP 1. {main}() \path\to\project\wp-admin\index.php:0 [28-Feb-2019 07:58:02 UTC] PHP 2. require_once() \path\to\project\wp-admin\index.php:10 [28-Feb-2019 07:58:02 UTC] PHP 3. do_action() \path\to\project\wp-admin\admin.php:253 [28-Feb-2019 07:58:02 UTC] PHP 4. WP_Hook->do_action() \path\to\project\wp-includes\plugin.php:465 [28-Feb-2019 07:58:02 UTC] PHP 5. WP_Hook->apply_filters() \path\to\project\wp-includes\class-wp-hook.php:310 [28-Feb-2019 07:58:02 UTC] PHP 6. WP_Piwik\Admin\Statistics->show() \path\to\project\wp-includes\class-wp-hook.php:286 [28-Feb-2019 07:58:02 UTC] PHP 7. do_meta_boxes() \path\to\project\wp-content\plugins\wp-piwik\classes\WP_Piwik\Admin\Statistics.php:31 [28-Feb-2019 07:58:02 UTC] PHP 8. WP_Piwik\Widget\Referrers->show() \path\to\project\wp-admin\includes\template.php:1306 [28-Feb-2019 07:58:02 UTC] PHP Warning: Invalid argument supplied for foreach() in \path\to\project\wp-content\plugins\wp-piwik\classes\WP_Piwik\Widget\Plugins.php on line 28 [28-Feb-2019 07:58:02 UTC] PHP Stack trace: [28-Feb-2019 07:58:02 UTC] PHP 1. {main}() \path\to\project\wp-admin\index.php:0 [28-Feb-2019 07:58:02 UTC] PHP 2. require_once() \path\to\project\wp-admin\index.php:10 [28-Feb-2019 07:58:02 UTC] PHP 3. do_action() \path\to\project\wp-admin\admin.php:253 [28-Feb-2019 07:58:02 UTC] PHP 4. WP_Hook->do_action() \path\to\project\wp-includes\plugin.php:465 [28-Feb-2019 07:58:02 UTC] PHP 5. WP_Hook->apply_filters() \path\to\project\wp-includes\class-wp-hook.php:310 [28-Feb-2019 07:58:02 UTC] PHP 6. WP_Piwik\Admin\Statistics->show() \path\to\project\wp-includes\class-wp-hook.php:286 [28-Feb-2019 07:58:02 UTC] PHP 7. do_meta_boxes() \path\to\project\wp-content\plugins\wp-piwik\classes\WP_Piwik\Admin\Statistics.php:31 [28-Feb-2019 07:58:02 UTC] PHP 8. WP_Piwik\Widget\Plugins->show() \path\to\project\wp-admin\includes\template.php:1306 [28-Feb-2019 07:58:02 UTC] PHP Warning: Invalid argument supplied for foreach() in \path\to\project\wp-content\plugins\wp-piwik\classes\WP_Piwik\Widget\Search.php on line 28 [28-Feb-2019 07:58:02 UTC] PHP Stack trace: [28-Feb-2019 07:58:02 UTC] PHP 1. {main}() \path\to\project\wp-admin\index.php:0 [28-Feb-2019 07:58:02 UTC] PHP 2. require_once() \path\to\project\wp-admin\index.php:10 [28-Feb-2019 07:58:02 UTC] PHP 3. do_action() \path\to\project\wp-admin\admin.php:253 [28-Feb-2019 07:58:02 UTC] PHP 4. WP_Hook->do_action() \path\to\project\wp-includes\plugin.php:465 [28-Feb-2019 07:58:02 UTC] PHP 5. WP_Hook->apply_filters() \path\to\project\wp-includes\class-wp-hook.php:310 [28-Feb-2019 07:58:02 UTC] PHP 6. WP_Piwik\Admin\Statistics->show() \path\to\project\wp-includes\class-wp-hook.php:286 [28-Feb-2019 07:58:02 UTC] PHP 7. do_meta_boxes() \path\to\project\wp-content\plugins\wp-piwik\classes\WP_Piwik\Admin\Statistics.php:31 [28-Feb-2019 07:58:02 UTC] PHP 8. WP_Piwik\Widget\Search->show() \path\to\project\wp-admin\includes\template.php:1306 [28-Feb-2019 07:58:02 UTC] PHP Warning: Invalid argument supplied for foreach() in \path\to\project\wp-content\plugins\wp-piwik\classes\WP_Piwik\Widget\Noresult.php on line 28
(real path changed to \path\to\project)
Current config
PHP 7.0.x
Wordpress 5.1
WP_Piwik 1.0.19
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘PHP 7.2 > Invalid argument supplied for foreach()’ is closed to new replies.