select can return false.
need a more unique key name to avoid conflicts
might get false if there are no more rows
You can test for false.
if ($res === false)
Note the three equals signs. This tests for type and value equality.
Yes, but an db object won't evaluate as false, so this is safe. I've nothing against the === operator if you prefer that, though.
* @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.
For MediaWiki usage, you're really only going to get a ResultWrapper object or false. If it throws an exception we don't care what the return value is anyway
Cannot be automatically merged. r- until resubmitted.
Re-done in https://github.com/reedy/mediawiki-bugzilla/compare/sqlcache