summaryrefslogtreecommitdiff
path: root/classes/Notice.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-01-04 10:03:57 -1000
committerEvan Prodromou <evan@status.net>2010-01-04 10:03:57 -1000
commit06b6a27d7d31cb0680dffff70c498e27ece56762 (patch)
treecaf74803d27366e09385105c482a7206d0d0c4e0 /classes/Notice.php
parent254ea279d8c86ed25ed74bff036b16e6293571f7 (diff)
cached id streams can be empty, compare against false
Diffstat (limited to 'classes/Notice.php')
-rw-r--r--classes/Notice.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index 3e55bd6fa..e8bc509a6 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);