some is_array() sanity checks for content (possible fix for #49)

This commit is contained in:
Andrew Dolgov 2006-03-18 16:35:57 +01:00
parent 1f0d3e0765
commit c22789da91
1 changed files with 6 additions and 2 deletions

View File

@ -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) {