[Pkg-owncloud-commits] [owncloud] 59/69: Memcached hasKey should test for success, the get can fail for other reasons.

David Prévot taffit at moszumanska.debian.org
Sat May 10 16:20:40 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 88225db4af499a7e13fc62ceb8cd9de461878202
Author: Bart Visscher <bartv at thisnet.nl>
Date:   Thu May 8 18:11:29 2014 +0200

    Memcached hasKey should test for success, the get can fail for other reasons.
    
    One of the other failures is no running server.
---
 lib/private/memcache/memcached.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/private/memcache/memcached.php b/lib/private/memcache/memcached.php
index 075828e..cd8e2e8 100644
--- a/lib/private/memcache/memcached.php
+++ b/lib/private/memcache/memcached.php
@@ -57,7 +57,7 @@ class Memcached extends Cache {
 
 	public function hasKey($key) {
 		self::$cache->get($this->getNamespace() . $key);
-		return self::$cache->getResultCode() !== \Memcached::RES_NOTFOUND;
+		return self::$cache->getResultCode() === \Memcached::RES_SUCCESS;
 	}
 
 	public function remove($key) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list