X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fnoticesearchrss.php;h=2a4b2060d3fa3f2d3781d429f27cbd5a372ce9a3;hb=2934099fbd17281ed00055af654aa5b813d535a2;hp=c1bf3bf5f21db9311e3b9b60b6b170c592f50a9d;hpb=3e60160f07f32d109b545db6b73be344b9180de8;p=quix0rs-gnu-social.git diff --git a/actions/noticesearchrss.php b/actions/noticesearchrss.php index c1bf3bf5f2..2a4b2060d3 100644 --- a/actions/noticesearchrss.php +++ b/actions/noticesearchrss.php @@ -67,11 +67,16 @@ class NoticesearchrssAction extends Rss10Action if (!$limit) $limit = 20; $search_engine->limit(0, $limit, true); - $search_engine->query($q); - $notice->find(); + if (false === $search_engine->query($q)) { + $cnt = 0; + } else { + $cnt = $notice->find(); + } - while ($notice->fetch()) { - $notices[] = clone($notice); + if ($cnt > 0) { + while ($notice->fetch()) { + $notices[] = clone($notice); + } } return $notices;