From c22789da91173a0d176469097a1189ff8e62bb21 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 18 Mar 2006 16:35:57 +0100 Subject: [PATCH] some is_array() sanity checks for content (possible fix for #49) --- functions.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/functions.php b/functions.php index 18546ca1..f9f024cb 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) { -- 2.39.5