diff --git a/src/Adapter/Predis/PredisCachePool.php b/src/Adapter/Predis/PredisCachePool.php index f1ec6eee..cc43d26a 100644 --- a/src/Adapter/Predis/PredisCachePool.php +++ b/src/Adapter/Predis/PredisCachePool.php @@ -42,11 +42,13 @@ public function __construct(Client $cache) */ protected function fetchObjectFromCache($key) { - if (false === $result = unserialize($this->cache->get($this->getHierarchyKey($key)))) { + $result = $this->cache->get($this->getHierarchyKey($key)); + + if (false === $result || null === $result) { return [false, null, [], null]; } - return $result; + return unserialize($result); } /**