X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=classes%2FNotice.php;h=650dca051b359727ec00cc64c8f44b07cd280a3e;hb=0502e1d737af1586a7a280be005e55d85c71175a;hp=29824ab700587eef371e1737d834914c2f332dd3;hpb=7e9c17bd152d328d5ed75468a84c6d6db276bbb6;p=quix0rs-gnu-social.git diff --git a/classes/Notice.php b/classes/Notice.php index 29824ab700..650dca051b 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -1,7 +1,7 @@ get(Cache::key('notice:repeats:'.$this->id)); if ($idstr !== false) { - $ids = explode(',', $idstr); + if (empty($idstr)) { + $ids = array(); + } else { + $ids = explode(',', $idstr); + } } else { $ids = $this->_repeatStreamDirect(100); $cache->set(Cache::key('notice:repeats:'.$this->id), implode(',', $ids)); @@ -1885,18 +1894,7 @@ class Notice extends Memcached_DataObject $notice->limit(0, $limit); } - $ids = array(); - - if ($notice->find()) { - while ($notice->fetch()) { - $ids[] = $notice->id; - } - } - - $notice->free(); - $notice = NULL; - - return $ids; + return $notice->fetchAll('id'); } function locationOptions($lat, $lon, $location_id, $location_ns, $profile = null)