From: Andrew Dolgov Date: Sat, 18 Mar 2006 15:35:57 +0000 (+0100) Subject: some is_array() sanity checks for content (possible fix for #49) X-Git-Tag: 1.1.4~4 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=c22789da91173a0d176469097a1189ff8e62bb21;p=tt-rss.git some is_array() sanity checks for content (possible fix for #49) --- 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) {