Last modified: 2014-06-21 19:58:01 UTC
Warning: Invalid argument supplied for foreach() in /usr/local/apache/common-local/php-1.21wmf9/includes/resourceloader/ResourceLoaderWikiModule.php on line 225
--- class ResourceLoaderWikiModule --- protected function getTitleMtimes if ( !$batch->isEmpty() ) { $res = $dbr->select( 'page', array( 'page_namespace', 'page_title', 'page_touched' ), $batch->constructSet( 'page', $dbr ), __METHOD__ ); foreach ( $res as $row ) {
Database::select * @return ResultWrapper. If the query returned no rows, a ResultWrapper * with no rows in it will be returned. If there was a query error, a * DBQueryError exception will be thrown, except if the "ignore errors" * option was set, in which case false will be returned. Someone leaks the ignore error option here?
So I did a quick grep on the core, and $db->ignoreErrors() is not called anywhere. The function is literally unused. The only reason I can think of for this error occurring is if DBO_IGNORE is set in the flags for starting the database connection. On that note, is it really sane to be returning false from $dbr->select()? If the ignore errors flag was set, it means the caller doesn't give a damn about errors whatsoever. I feel like the correct behavior would be to return some sort of empty fake result wrapper.
Removing target milestone that was in the past. If you want this in a specific release, have a good reason AND you are willing to find resources to fix this bug, feel free to change it to something appropriate.