Mediawiki site generating Warning: Invalid argument supplied for foreach() in LocalisationCache.php on line 390
Had to blog about this, as I had a problem with one of my MediaWiki sites that I moved onto a shared hosting provider.
Every page when loaded would generate the error below displayed somewhere on the page. i.e in my case at the top in my header region.
Warning: Invalid argument supplied for foreach() in /path/to/file/includes/cache/LocalisationCache.php on line 390
The fix for this is easy, just run the rebuildLocalisationCache.php script in maintenance folder and if you don’t have access to run it via a shell you can add the following line into your LocalSettings.php file instead;
$wgLocalisationCacheConf[‘manualRecache’] = true;
Check out the page here for more specific details on the script use etc.