summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-04-01 17:23:44 +0400
committerAndrew Dolgov <[email protected]>2011-04-01 17:23:44 +0400
commita9ac55ea76a7f1ee477865113bb39be162c7e971 (patch)
tree415cdb14d876b922c16bc1d9548107cdb21615ab
parent6eb8d32d9640b1dae136baf7719dee0006bf34ed (diff)
update_rss_feed: misc fixes
-rw-r--r--functions.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/functions.php b/functions.php
index 026ea5750..5096484c0 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;
}
}
}