From: Andrew Dolgov Date: Thu, 28 Mar 2013 04:19:05 +0000 (+0400) Subject: getVirtCounters: check if plugin feeds exist X-Git-Tag: 1.7.6~227 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=0196ef94f46243ede3235655f921a84fa336097e;p=tt-rss.git getVirtCounters: check if plugin feeds exist --- diff --git a/include/functions.php b/include/functions.php index f33de076..f2eeb976 100644 --- a/include/functions.php +++ b/include/functions.php @@ -1436,13 +1436,14 @@ if ($pluginhost) { $feeds = $pluginhost->get_feeds(-1); - foreach ($feeds as $feed) { - $cv = array("id" => PluginHost::pfeed_to_feed_id($feed['id']), - "counter" => $feed['sender']->get_unread($feed['id'])); + if (is_array($feeds)) { + foreach ($feeds as $feed) { + $cv = array("id" => PluginHost::pfeed_to_feed_id($feed['id']), + "counter" => $feed['sender']->get_unread($feed['id'])); - array_push($ret_arr, $cv); + array_push($ret_arr, $cv); + } } - } return $ret_arr;