From 9087a4d49065af63b638f8eaa79329d496d26d14 Mon Sep 17 00:00:00 2001 From: Marc Bennewitz Date: Fri, 14 Nov 2014 08:13:08 +0000 Subject: [PATCH] Memcached returns FALSE on failure ... so it's not required to check for NULL, too. The note Memcached returns NULL was a miss information in changelog of memcached-2.0 --- src/Storage/Adapter/Memcached.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Storage/Adapter/Memcached.php b/src/Storage/Adapter/Memcached.php index 9a75b52..54bbed7 100644 --- a/src/Storage/Adapter/Memcached.php +++ b/src/Storage/Adapter/Memcached.php @@ -222,7 +222,7 @@ protected function internalGetItem(& $normalizedKey, & $success = null, & $casTo } $success = true; - if ($result === false || $result === null) { + if ($result === false) { $rsCode = $memc->getResultCode(); if ($rsCode == MemcachedResource::RES_NOTFOUND) { $result = null; @@ -280,7 +280,7 @@ protected function internalHasItem(& $normalizedKey) { $memc = $this->getMemcachedResource(); $value = $memc->get($this->namespacePrefix . $normalizedKey); - if ($value === false || $value === null) { + if ($value === false) { $rsCode = $memc->getResultCode(); if ($rsCode == MemcachedResource::RES_SUCCESS) { return true;