summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/functions.php b/functions.php
index 18546ca18..f9f024cbc 100644
--- a/functions.php
+++ b/functions.php
@@ -301,8 +301,12 @@
$iterator = $rss->items;
- if (!$iterator) $iterator = $rss->entries;
- if (!$iterator) $iterator = $rss;
+ if (!$iterator || !is_array($iterator)) $iterator = $rss->entries;
+ if (!$iterator || !is_array($iterator)) $iterator = $rss;
+
+ if (!is_array($iterator)) {
+ return; // WTF?
+ }
foreach ($iterator as $item) {