Last modified: 2014-02-07 16:41:17 UTC
These errors seem to come in pairs and recur quite often in the fatalmonitor/apache2 logs: PHP Warning: Invalid argument supplied for foreach() in /usr/local/apache/common-local/php-1.23wmf10/includes/filebackend/SwiftFileBackend.php on line 180 PHP Warning: Invalid argument supplied for foreach() in /usr/local/apache/common-local/php-1.23wmf10/includes/filebackend/SwiftFileBackend.php on line 648 $ fgrep "SwiftFileBackend.php on line 180" /a/mw-log/apache2.log |wc -l 927 $ fgrep "SwiftFileBackend.php on line 648" /a/mw-log/apache2.log |wc -l 927
I think this is caused by SwitftFileBackend::addMissingMetadata(). This method is documented to return an array and used as though it will always return an array but the current implementation will only return an array in the "happy path" use case where the header collection passed to it already contains the 'x-object-meta-sha1base36' header. In all other execution paths it returns a boolean rather than an array.
Change 109690 had a related patch set uploaded by BryanDavis: Always return an array from SwiftFileBackend::addMissingMetadata https://gerrit.wikimedia.org/r/109690
Change 109690 merged by jenkins-bot: Always return an array from SwiftFileBackend::addMissingMetadata https://gerrit.wikimedia.org/r/109690
was successfully merged
The log messages from the original report are no longer being seen in the fatal log monitor now that all wikis are on 1.23wmf12 or newer.