diff --git a/src/Vinelab/Rss/Feed.php b/src/Vinelab/Rss/Feed.php index a87e15b..b47f1c7 100644 --- a/src/Vinelab/Rss/Feed.php +++ b/src/Vinelab/Rss/Feed.php @@ -55,8 +55,12 @@ public function setArticles($channel) { $this->articles = new ArticlesCollection(); - foreach ($channel['item'] as $entry) { - $this->addArticle($entry); + if(is_array($channel['item'])){ + foreach ($channel['item'] as $entry) { + $this->addArticle($entry); + } + }else{ + $this->addArticle($channel['item']); } }