I updated our Intranet wiki from 1.8.2 to 1.9.3 using the shell based update.php script. It ran through all the way but printed some warnings:
[...] Checking if pagelinks index pl_namespace includes field pl_from... ...index pl_namespace on table pagelinks has no field pl_from; adding Deleting old default messages..."" is not a valid magic thingie for "special"
Warning: array_slice(): The first argument should be an array in /var/www/mediawiki-1.9.3/languages/Language.php on line 1105 "" is not a valid magic thingie for "defaultsort"
Warning: array_slice(): The first argument should be an array in /var/www/mediawiki-1.9.3/languages/Language.php on line 1105 Done Purging caches...done. Done. linuxsrv1:/var/www/mediawiki-1.9.3/maintenance# cd ..
The Wiki does now run with version 1.9.3, but on every page I get 3 warnings in the header:
Warning: array_slice() [function.array-slice]: The first argument should be an array in /var/www/mediawiki-1.9.3/languages/Language.php on line 1105 Warning: array_slice() [function.array-slice]: The first argument should be an array in /var/www/mediawiki-1.9.3/languages/Language.php on line 1105 Warning: Invalid argument supplied for foreach() in /var/www/mediawiki-1.9.3/includes/SpecialPage.php on line 199
As a temporary workaround, I set error_reporting(0) around those lines, but that's obviously not a proper solution.
There seem to be other users with the same problem, but I did not find a solution anywhere on the net. Why do these messages occur and how do I fix this? This error can also be observed on http://www.apple2games.com/wiki/Main_Page
I reported the error on http://www.mediawiki.org/wiki/Project:Support_desk#PHP_warnings_in_page_head... but did not have any responses so far.
Any ideas?
Best regards Thomas Böhne
Thomas Boehne wrote:
I updated our Intranet wiki from 1.8.2 to 1.9.3 using the shell based update.php script. It ran through all the way but printed some warnings: [...] Warning: array_slice() [function.array-slice]: The first argument should be
an array in /var/www/mediawiki-1.9.3/languages/Language.php on line 1105
Warning: array_slice() [function.array-slice]: The first argument should be
an array in /var/www/mediawiki-1.9.3/languages/Language.php on line 1105
Warning: Invalid argument supplied for foreach() in
/var/www/mediawiki-1.9.3/includes/SpecialPage.php on line 199
I tried to debug the problem today. I removed the temporary error_reporting(0), but the problem does not occur anymore. So I guess it was a caching problem with memcached, but unfortunately I cannot confirm this. For everybody else who ran into the same problem, I suggest restarting apache, memcached and the browser (and probably clear the cache as well).
Best regards Thomas Böhne
mediawiki-l@lists.wikimedia.org