From 4294987ed248ff0bd37b9fea5561134e4b8afc04 Mon Sep 17 00:00:00 2001
From: Alex Barth <alex_b@53995.no-reply.drupal.org>
Date: Mon, 12 Apr 2010 01:21:07 +0000
Subject: [PATCH] #758664: Fix regression introduced with #740962.

---
 CHANGELOG.txt | 5 +++++
 feeds.module  | 6 +++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 27871194..1d04978d 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,6 +1,11 @@
 // $Id$
 
 
+Feeds 6.x 1.0 Alpha 14, 2010-04-11
+----------------------------------
+
+- #758664: Fix regression introduced with #740962.
+
 Feeds 6.x 1.0 Alpha 13, 2010-03-30
 ----------------------------------
 
diff --git a/feeds.module b/feeds.module
index 3d91cad2..2c89ddb9 100644
--- a/feeds.module
+++ b/feeds.module
@@ -292,6 +292,10 @@ function feeds_nodeapi(&$node, $op, $form) {
         break;
       case 'insert':
       case 'update':
+        // A node may not have been validated, make sure $node_feeds is present.
+        if (empty($node_feeds)) {
+          $node_feeds = $node->feeds;
+        }
         // Add configuration to feed source and save.
         $source = feeds_source($importer_id, $node->nid);
         $source->addConfig($node_feeds);
@@ -307,7 +311,7 @@ function feeds_nodeapi(&$node, $op, $form) {
         // Add expiry to schedule, in case this is the first feed of this
         // configuration.
         feeds_scheduler()->add($importer_id, 'expire');
-        unset($node_feeds);
+        $node_feeds = NULL;
         break;
       case 'delete':
         // Remove feed from scheduler and delete source.
-- 
GitLab