From 8c7b85758d7908b4e350cc73d212ad37248e0b52 Mon Sep 17 00:00:00 2001
From: Tobby Hagler <tobby.hagler@gmail.com>
Date: Tue, 8 Mar 2011 10:09:02 -0500
Subject: [PATCH] Issue #1048642 by greg.harvey: Check for remove_flags in
 Feeds UI before using that variable.

---
 feeds_ui/feeds_ui.admin.inc | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/feeds_ui/feeds_ui.admin.inc b/feeds_ui/feeds_ui.admin.inc
index f804da62..2a23bc09 100644
--- a/feeds_ui/feeds_ui.admin.inc
+++ b/feeds_ui/feeds_ui.admin.inc
@@ -608,11 +608,13 @@ function feeds_ui_mapping_form_submit($form, &$form_state) {
     }
   }
 
-  foreach ($form_state['values']['remove_flags'] as $k => $v) {
-    if ($v) {
-      unset($mappings[$k]);
-      // Keep our keys clean.
-      $mappings = array_values($mappings);
+  if (!empty($form_state['values']['remove_flags'])) {
+    foreach ($form_state['values']['remove_flags'] as $k => $v) {
+      if ($v) {
+        unset($mappings[$k]);
+        // Keep our keys clean.
+        $mappings = array_values($mappings);
+      }
     }
   }
   $processor->addConfig(array('mappings' => $mappings));
-- 
GitLab