]> git.wh0rd.org Git - tt-rss.git/commitdiff
update_rss_feed: misc fixes
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 1 Apr 2011 13:23:44 +0000 (17:23 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 1 Apr 2011 13:23:44 +0000 (17:23 +0400)
functions.php

index 026ea5750144f79e08738f1818c2b75e754b2d9b..5096484c08f9017e4da8c781f9a427da947fd387 100644 (file)
                                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 {
                                                        for ($i = 2; $i <= $atom['link#']; $i++) {
                                                                if ($atom["link#$i@rel"] == 'hub') {
                                                                        $feed_hub_url = $atom["link#$i@href"];
+                                                                       break;
                                                                }
                                                        }
                                                }