From: Alexandre Emsenhuber Date: Sun, 10 Oct 2010 09:46:52 +0000 (+0000) Subject: Return null instead of false SqlBagOStuff::incr(), for consistency with other classes... X-Git-Tag: 1.31.0-rc.0~34555 X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28%27static%27%2C%20filename=%27css/%22%24fichier/%7B%7B%20attachment.url%20%7D%7D?a=commitdiff_plain;h=e6cb6b06451943d2cc3446e61482ce06be0d140a;p=lhc%2Fweb%2Fwiklou.git Return null instead of false SqlBagOStuff::incr(), for consistency with other classes (was breaking e.g. wfIncrStats()) --- diff --git a/includes/BagOStuff.php b/includes/BagOStuff.php index 5482dcd809..d2c95feb30 100644 --- a/includes/BagOStuff.php +++ b/includes/BagOStuff.php @@ -356,14 +356,14 @@ class SqlBagOStuff extends BagOStuff { // Missing $db->commit(); - return false; + return null; } $db->delete( 'objectcache', array( 'keyname' => $key ), __METHOD__ ); if ( $this->isExpired( $row->exptime ) ) { // Expired, do not reinsert $db->commit(); - return false; + return null; } $oldValue = intval( $this->unserialize( $db->decodeBlob( $row->value ) ) ); @@ -378,7 +378,7 @@ class SqlBagOStuff extends BagOStuff { } catch ( DBQueryError $e ) { $this->handleWriteError( $e ); - return false; + return null; } return $newValue;