From a52af954b8d608a1daa4815f6c2bbb2be34f75f5 Mon Sep 17 00:00:00 2001
From: Alex Barth <alex_b@53995.no-reply.drupal.org>
Date: Mon, 8 Feb 2010 19:48:15 +0000
Subject: [PATCH] #701432 pounard, Will White: PHP 5.3: array_shift() expects
 parameter 1 to be array, null given in (...).

---
 includes/FeedsBatch.inc            | 3 +++
 plugins/FeedsSyndicationParser.inc | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/includes/FeedsBatch.inc b/includes/FeedsBatch.inc
index c39ffd21..95f15b6e 100644
--- a/includes/FeedsBatch.inc
+++ b/includes/FeedsBatch.inc
@@ -133,6 +133,9 @@ class FeedsImportBatch {
 
   /**
    * Set items.
+   * 
+   * @param $items
+   *   An array of the items in the feed. Cannot be NULL.
    */
   public function setItems($items) {
     $this->items = $items;
diff --git a/plugins/FeedsSyndicationParser.inc b/plugins/FeedsSyndicationParser.inc
index 1561bce2..98ab1f0b 100644
--- a/plugins/FeedsSyndicationParser.inc
+++ b/plugins/FeedsSyndicationParser.inc
@@ -17,7 +17,9 @@ class FeedsSyndicationParser extends FeedsParser {
     $batch->setTitle($result['title']);
     $batch->setDescription($result['description']);
     $batch->setLink($result['link']);
-    $batch->setItems($result['items']);
+    if (is_array($result['items'])) {
+      $batch->setItems($result['items']);
+    }
   }
 
   /**
-- 
GitLab