MemcachedClient: Always return an array from get_multi(), don't return false
authorRoan Kattouw <roan.kattouw@gmail.com>
Fri, 6 May 2016 18:25:56 +0000 (11:25 -0700)
committerBryanDavis <bdavis@wikimedia.org>
Fri, 6 May 2016 18:37:59 +0000 (18:37 +0000)
MemcachedPhpBagOStuff::getMulti() wraps around this method directly,
so get_multi() returning false was causing it to violate
BagOStuff's requirement that getMulti() always return an array.

Change-Id: Ia8f076323aed5b4a12de82d519eb530ed29d7060

includes/libs/objectcache/MemcachedClient.php

index 59322b6..668135d 100644 (file)
@@ -487,7 +487,7 @@ class MemcachedClient {
         */
        public function get_multi( $keys ) {
                if ( !$this->_active ) {
-                       return false;
+                       return array();
                }
 
                if ( isset( $this->stats['get_multi'] ) ) {