diff options
author | Andrew Dolgov <[email protected]> | 2013-03-28 08:19:05 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-03-28 08:19:05 +0400 |
commit | 0196ef94f46243ede3235655f921a84fa336097e (patch) | |
tree | 4f76f92cf83d58de084560e42fc97c08adb584af /include | |
parent | 5160620c8a3c940688f60cc32abb2387a87139dd (diff) |
getVirtCounters: check if plugin feeds exist
Diffstat (limited to 'include')
-rw-r--r-- | include/functions.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/functions.php b/include/functions.php index f33de076b..f2eeb976b 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; |