Fixed IDE error in mergeViaLock()
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 21 Aug 2015 20:04:09 +0000 (13:04 -0700)
committerBryanDavis <bdavis@wikimedia.org>
Fri, 21 Aug 2015 20:37:02 +0000 (20:37 +0000)
Change-Id: I50b5a22bf353272ad6960181db07c2f4ec857f3c

includes/libs/objectcache/BagOStuff.php

index d72e1a5..006acf3 100644 (file)
@@ -200,10 +200,11 @@ abstract class BagOStuff implements LoggerAwareInterface {
 
                $this->clearLastError();
                $currentValue = $this->get( $key );
-               if ( !$this->getLastError() ) {
+               if ( $this->getLastError() ) {
+                       $success = false;
+               } else {
                        // Derive the new value from the old value
                        $value = call_user_func( $callback, $this, $key, $currentValue );
-
                        if ( $value === false ) {
                                $success = true; // do nothing
                        } else {