From: Evan Prodromou Date: Mon, 4 Jan 2010 20:03:57 +0000 (-1000) Subject: cached id streams can be empty, compare against false X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=06b6a27d7d31cb0680dffff70c498e27ece56762;p=quix0rs-gnu-social.git cached id streams can be empty, compare against false --- diff --git a/classes/Notice.php b/classes/Notice.php index 3e55bd6fa5..e8bc509a68 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -1207,7 +1207,7 @@ class Notice extends Memcached_DataObject $idstr = $cache->get($idkey); - if (!empty($idstr)) { + if ($idstr !== false) { // Cache hit! Woohoo! $window = explode(',', $idstr); $ids = array_slice($window, $offset, $limit); @@ -1216,7 +1216,7 @@ class Notice extends Memcached_DataObject $laststr = $cache->get($idkey.';last'); - if (!empty($laststr)) { + if ($laststr !== false) { $window = explode(',', $laststr); $last_id = $window[0]; $new_ids = call_user_func_array($fn, array_merge($args, array(0, NOTICE_CACHE_WINDOW, @@ -1376,7 +1376,7 @@ class Notice extends Memcached_DataObject $ids = $this->_repeatStreamDirect($limit); } else { $idstr = $cache->get(common_cache_key('notice:repeats:'.$this->id)); - if (!empty($idstr)) { + if ($idstr !== false) { $ids = explode(',', $idstr); } else { $ids = $this->_repeatStreamDirect(100);