Page MenuHomePhabricator

Warning: Invalid argument supplied for foreach() in includes/LocalisationCache.php when language == pt
Closed, ResolvedPublic

Description

After updating MW from trunk a few minutes ago, if I run

php maintenance/update.php

I get the following errors:

PHP Warning: array_merge(): Argument #2 is not an array in /var/www/mediawiki/includes/LocalisationCache.php on line 533

Warning: array_merge(): Argument #2 is not an array in /var/www/mediawiki/includes/LocalisationCache.php on line 533
PHP Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 271

Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 271
PHP Notice: Undefined index: messages in /var/www/mediawiki/includes/LocalisationCache.php on line 211

Notice: Undefined index: messages in /var/www/mediawiki/includes/LocalisationCache.php on line 211
PHP Warning: array_unshift() expects parameter 1 to be array, null given in /var/www/mediawiki/includes/LocalisationCache.php on line 541

Warning: array_unshift() expects parameter 1 to be array, null given in /var/www/mediawiki/includes/LocalisationCache.php on line 541
PHP Warning: array_merge(): Argument #2 is not an array in /var/www/mediawiki/includes/LocalisationCache.php on line 547

Warning: array_merge(): Argument #2 is not an array in /var/www/mediawiki/includes/LocalisationCache.php on line 547
PHP Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474

Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474
PHP Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474

Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474
PHP Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474

Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474
PHP Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474

Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474
PHP Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474

Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474
PHP Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474

Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474
PHP Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474

Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474
PHP Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474

Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474
PHP Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 655

Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 655
PHP Warning: array_unshift() expects parameter 1 to be array, null given in /var/www/mediawiki/includes/LocalisationCache.php on line 541

Warning: array_unshift() expects parameter 1 to be array, null given in /var/www/mediawiki/includes/LocalisationCache.php on line 541
PHP Warning: array_merge(): Argument #2 is not an array in /var/www/mediawiki/includes/LocalisationCache.php on line 547

Warning: array_merge(): Argument #2 is not an array in /var/www/mediawiki/includes/LocalisationCache.php on line 547
PHP Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474

Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474
PHP Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474

Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474
PHP Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474

Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474
PHP Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474

Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474
PHP Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474

Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474
PHP Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474

Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474
PHP Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474

Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474
PHP Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474

Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 474
PHP Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 655

Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 655
MediaWiki 1.19alpha Updater

(...some usual messages from here)


Version: 1.20.x
Severity: normal

Details

Reference
bz30456

Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 21 2014, 11:58 PM
bzimport set Reference to bz30456.
bzimport added a subscriber: Unknown Object (MLST).
He7d3r created this task.Aug 19 2011, 2:28 AM

The problem seems to be caused by r94908 and disapears when I do any of these two things:

  1. Run

sudo svn update -r 94907

  1. Change $wgLanguageCode from "pt" to "it";

Please verify r94991.

(In reply to comment #2)

Please verify r94991.

The

Warning: Invalid argument supplied for foreach() in...

is gone, but I still get a few warnings:

php maintenance/update.php

PHP Warning: array_merge(): Argument #2 is not an array in /var/www/mediawiki/includes/LocalisationCache.php on line 536

Warning: array_merge(): Argument #2 is not an array in /var/www/mediawiki/includes/LocalisationCache.php on line 536
PHP Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 271

Warning: Invalid argument supplied for foreach() in /var/www/mediawiki/includes/LocalisationCache.php on line 271
PHP Notice: Undefined index: messages in /var/www/mediawiki/includes/LocalisationCache.php on line 211

Notice: Undefined index: messages in /var/www/mediawiki/includes/LocalisationCache.php on line 211
PHP Warning: array_merge(): Argument #1 is not an array in /var/www/mediawiki/includes/LocalisationCache.php on line 536

Warning: array_merge(): Argument #1 is not an array in /var/www/mediawiki/includes/LocalisationCache.php on line 536
MediaWiki 1.19alpha Updater
(... some usual messages...)

I'm curious what is your configuration, since I cannot reproduce. Have you also tried deleting the old caches first?

Created attachment 8943
LocalSettings.php

(In reply to comment #4)

I'm curious what is your configuration, since I cannot reproduce.

I've attached a copy of my current LocalSetttings.php. I can see the error only if I set $wgLanguageCode = "pt";

Have you also tried deleting the old caches first?

How do I do that?

Attached:

I found something weird when setting language to 'pt', but didn't get any warnings.

(In reply to comment #6)

I found something weird when setting language to 'pt', but didn't get any
warnings.

Is there any other information which I could provide to help finding the problem?

First I will dig out the cause for what I'm seeing (broken cache dependencies), maybe it is related to what you see.

Can you test trunk again?

(In reply to comment #9)

Can you test trunk again?

Tested. It seems to be working fine. The warnings disappeared =)