summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2006-03-18 16:35:57 +0100
committerAndrew Dolgov <[email protected]>2006-03-18 16:35:57 +0100
commitc22789da91173a0d176469097a1189ff8e62bb21 (patch)
treea14bc4566dfd68dfb2083934089326d31c6128cc /functions.php
parent1f0d3e07659dba7cd4ff6592f85cc6cef66e58eb (diff)
some is_array() sanity checks for content (possible fix for #49)
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) {