Last modified: 2014-07-25 14:53:00 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T58661, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 56661 - SqlBagOStuff.php on line 232 / Invalid argument supplied for foreach()
SqlBagOStuff.php on line 232 / Invalid argument supplied for foreach()
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.23.0
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
https://s3.amazonaws.com/archive.trav...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-06 11:06 UTC by MWJames
Modified: 2014-07-25 14:53 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description MWJames 2013-11-06 11:06:19 UTC
## Error
PHP Warning:  Invalid argument supplied for foreach() in /home/travis/build/wikimedia/phase3/includes/objectcache/SqlBagOStuff.php on line 232

## Cause (line 232)
$res = $db->select( ...) causes a fatal when the select returns a boolean (because DatabaseBase::resultObject is allowed to return a boolean) instead of a ResultWrapper, $res isn't checked and immediately used as input for the succeeding foreach ( $res as $row ) call.

MediaWiki 1.23alpha, other details can be looked up using the attached travis-log.
Comment 1 Umherirrender 2014-01-31 18:51:23 UTC
The question is, why a database error occurs, which will result in a false as return value. See also bug 56909
Comment 2 Umherirrender 2014-07-19 08:09:23 UTC
Maybe fixed by Gerrit change #141619
Comment 3 Umherirrender 2014-07-25 14:53:00 UTC
(In reply to Umherirrender from comment #2)
> Maybe fixed by Gerrit change #141619

Now merged, should be fixed.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links