diff --git a/src/Storage/Adapter/AbstractZendServer.php b/src/Storage/Adapter/AbstractZendServer.php index 6a79518da..a3500c017 100644 --- a/src/Storage/Adapter/AbstractZendServer.php +++ b/src/Storage/Adapter/AbstractZendServer.php @@ -39,7 +39,8 @@ protected function internalGetItem(& $normalizedKey, & $success = null, & $casTo $prefix = ($namespace === '') ? '' : $namespace . self::NAMESPACE_SEPARATOR; $result = $this->zdcFetch($prefix . $normalizedKey); - if ($result === null) { + if ($result === false) { + $result = null; $success = false; } else { $success = true; diff --git a/src/Storage/Adapter/ZendServerDisk.php b/src/Storage/Adapter/ZendServerDisk.php index 5400e7fd4..4abd70bfd 100644 --- a/src/Storage/Adapter/ZendServerDisk.php +++ b/src/Storage/Adapter/ZendServerDisk.php @@ -148,7 +148,7 @@ protected function zdcStore($internalKey, $value, $ttl) * Fetch a single item from Zend Data Disk Cache * * @param string $internalKey - * @return mixed The stored value or NULL if item wasn't found + * @return mixed The stored value or FALSE if item wasn't found * @throws Exception\RuntimeException */ protected function zdcFetch($internalKey) diff --git a/src/Storage/Adapter/ZendServerShm.php b/src/Storage/Adapter/ZendServerShm.php index db45de836..292de461b 100644 --- a/src/Storage/Adapter/ZendServerShm.php +++ b/src/Storage/Adapter/ZendServerShm.php @@ -103,7 +103,7 @@ protected function zdcStore($internalKey, $value, $ttl) * Fetch a single item from Zend Data SHM Cache * * @param string $internalKey - * @return mixed The stored value or NULL if item wasn't found + * @return mixed The stored value or FALSE if item wasn't found * @throws Exception\RuntimeException */ protected function zdcFetch($internalKey) diff --git a/test/Storage/Adapter/AbstractZendServerTest.php b/test/Storage/Adapter/AbstractZendServerTest.php index d838509d0..c316201c5 100644 --- a/test/Storage/Adapter/AbstractZendServerTest.php +++ b/test/Storage/Adapter/AbstractZendServerTest.php @@ -59,7 +59,7 @@ public function testGetItemFailed() $this->_storage->expects($this->once()) ->method('zdcFetch') ->with($this->equalTo('ns' . AbstractZendServer::NAMESPACE_SEPARATOR . 'key')) - ->will($this->returnValue(null)); + ->will($this->returnValue(false)); $this->assertNull($this->_storage->getItem('key', $success)); $this->assertFalse($success);