From: Andrew Dolgov Date: Fri, 1 Apr 2011 13:23:44 +0000 (+0400) Subject: update_rss_feed: misc fixes X-Git-Tag: 1.5.3~80 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=a9ac55ea76a7f1ee477865113bb39be162c7e971;p=tt-rss.git update_rss_feed: misc fixes --- diff --git a/functions.php b/functions.php index 026ea575..5096484c 100644 --- a/functions.php +++ b/functions.php @@ -772,9 +772,11 @@ if ($use_simplepie) { $links = $rss->get_links('hub'); - foreach ($links as $l) { - $feed_hub_url = $l; - break; + if ($links && is_array($links)) { + foreach ($links as $l) { + $feed_hub_url = $l; + break; + } } } else { @@ -789,6 +791,7 @@ for ($i = 2; $i <= $atom['link#']; $i++) { if ($atom["link#$i@rel"] == 'hub') { $feed_hub_url = $atom["link#$i@href"]; + break; } } }