Make sure getMulti() returns an array per the class interface
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 3 Sep 2014 19:48:37 +0000 (12:48 -0700)
committerBryanDavis <bdavis@wikimedia.org>
Wed, 3 Sep 2014 20:17:28 +0000 (20:17 +0000)
Change-Id: Ic08f3ac37467a2743d7f8be5f5fb0032f84c3b82

includes/objectcache/MemcachedPeclBagOStuff.php

index 8700c8c..c853bcf 100644 (file)
@@ -247,6 +247,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
                $callback = array( $this, 'encodeKey' );
                $result = $this->client->getMulti( array_map( $callback, $keys ) );
                wfProfileOut( __METHOD__ );
+               $result = $result ?: array(); // must be an array
                return $this->checkResult( false, $result );
        }