"Warning: Invalid argument supplied for foreach()..." after Update

Hi,

I just updated piwik from 1.8.3 to 1.8.4 and got this message. AFAIK everything is fine although.

There is an error. Please report the message (Piwik 1.8.4) and full backtrace in the Piwik forums (please do a Search first as it might have been reported already!).

Warning: Invalid argument supplied for foreach() in /var/www/piwik/core/Config.php on line 440

Backtrace -->
#0 Piwik_ErrorHandler(…) called at [/var/www/piwik/core/Config.php:440]#1 Piwik_Config->dumpConfig(…) called at [/var/www/piwik/core/Config.php:495]#2 Piwik_Config->writeConfig(…) called at [/var/www/piwik/core/Config.php:509]#3 Piwik_Config->forceSave(…) called at [/var/www/piwik/core/Updates.php:68]#4 Piwik_Updates::enableMaintenanceMode(…) called at [/var/www/piwik/core/Updates/1.8.4-b1.php:178]#5 Piwik_Updates_1_8_4_b1::update(…) called at [:]#6 call_user_func(…) called at [/var/www/piwik/core/Updater.php:172]#7 Piwik_Updater->update(…) called at [/var/www/piwik/plugins/CoreUpdater/Controller.php:367]#8 Piwik_CoreUpdater_Controller->loadAndExecuteUpdateFiles(…) called at [/var/www/piwik/plugins/CoreUpdater/Controller.php:348]#9 Piwik_CoreUpdater_Controller->doExecuteUpdates(…) called at [/var/www/piwik/plugins/CoreUpdater/Controller.php:270]#10 Piwik_CoreUpdater_Controller->runUpdaterAndExit(…) called at [/var/www/piwik/plugins/CoreUpdater/Controller.php:237]#11 Piwik_CoreUpdater_Controller->index(…) called at [:]#12 call_user_func_array(…) called at [/var/www/piwik/core/FrontController.php:138]#13 Piwik_FrontController->dispatch(…) called at [/var/www/piwik/index.php:53]

Can you please edit piwik/core/Config.php and add the line var_dump:


===================================================================
--- core/Config.php	(revision 6989)
+++ core/Config.php	(revision )
@@ -436,7 +436,7 @@
 				}
 				
 				$output .= "[$section]\n";
-
+var_dump($config);
 				foreach($config as $name => $value)
 				{
 					$value = $this->encodeValues($value);

Then what do you see on screen, there should be some text output before the error ? thanks!

So I have to run the update again. How can I do that?
(Even if I comment out the function checkNewVersionIsAvailableOrDie() in /CoreUpdater/Controller.php the OneClickInstaller does not perform database changes.)

I didn’t notice it was executed only during the upgrade. Is your plugin working fine despite having seen this error ?

Yes, it’s working fine. The error was shown after I updated the database with the one click installer.