From e6cb6b06451943d2cc3446e61482ce06be0d140a Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 10 Oct 2010 09:46:52 +0000 Subject: [PATCH] Return null instead of false SqlBagOStuff::incr(), for consistency with other classes (was breaking e.g. wfIncrStats()) --- includes/BagOStuff.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; -- 2.20.1