Page MenuHomePhabricator

PHP Warning: Invalid argument supplied for foreach() in ApiQuerySiteinfo.php on line 351
Closed, DeclinedPublic

Description

PHP Warning: Invalid argument supplied for foreach() in /usr/local/apache/common-local/php-1.23wmf19/includes/api/ApiQuerySiteinfo.php on line 351


Version: 1.23.0
Severity: normal

Details

Reference
bz63498

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:11 AM
bzimport set Reference to bz63498.
bzimport added a subscriber: Unknown Object (MLST).

Reedy: How often does this happen (this question basically applies to every such bug report, hence adding such info in comment 0 would be very helpful).

I see exactly one occurrence of this warning message in the apache2.log files on fluorine since 2014-03-20, at 2014-04-03 19:02:40.

The line in question is getting the argument for foreach by calling $wgContLang->getMagicWords(). Presumably this is returning some non-array value (null or false, I'd guess) where it is documented to return only arrays.

I did try correlating API queries to meta=siteinfo&siprop=magicwords at around that time, but making the same queries to the same wikis did not result in the warning being logged again to apache2.log.

Given all that, I'd suspect some bit of weirdness with the l10n update and the moving of the last wikis from wmf19 to wmf20 that was happening around that time. I'm going to close this for now, please reopen if it shows up again and particularly if it's reproducible.