From 7c17e93023ffc8d785b810af7551301cbd7f0457 Mon Sep 17 00:00:00 2001 From: Janek Lasocki-Biczysko Date: Tue, 22 Nov 2011 12:10:10 +0000 Subject: Fixes #1995 (memcache: incorrect check for get() return value) --- engine/classes/ElggMemcache.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engine/classes') diff --git a/engine/classes/ElggMemcache.php b/engine/classes/ElggMemcache.php index 1fd3be0d1..a54c29723 100644 --- a/engine/classes/ElggMemcache.php +++ b/engine/classes/ElggMemcache.php @@ -161,7 +161,7 @@ class ElggMemcache extends ElggSharedMemoryCache { } $result = $this->memcache->set($key, $data, null, $expires); - if (!$result) { + if ($result === false) { elgg_log("MEMCACHE: FAILED TO SAVE $key", 'ERROR'); } @@ -181,7 +181,7 @@ class ElggMemcache extends ElggSharedMemoryCache { $key = $this->_makeMemcacheKey($key); $result = $this->memcache->get($key); - if (!$result) { + if ($result === false) { elgg_log("MEMCACHE: FAILED TO LOAD $key", 'ERROR'); } -- cgit v1.2.3