--- image_fupload_imagefield.module	2010-01-06 05:09:08.000000000 +0100
+++ image_fupload_imagefield_new.module	2010-01-06 05:08:50.000000000 +0100
@@ -503,12 +503,14 @@ function image_fupload_imagefield_conten
 function form_fields_destroy(&$form, $fields_to_remove = array()) {
   // collect information about fields being used by image preview list, if needed  
   $fields = array();
-  foreach ($fields_to_remove as $key) {
-    $elements = explode("_", $key, 2);
-    if (!isset($fields[$elements[0]]) && $fields_to_remove[$key] != FALSE)
-      $fields[$elements[0]] = array();
-    if ($fields_to_remove[$key] != FALSE)
-      array_push($fields[$elements[0]], $elements[1]);
+  if (count($fields_to_remove)) {
+    foreach ($fields_to_remove as $key) {
+      $elements = explode("_", $key, 2);
+      if (!isset($fields[$elements[0]]) && $fields_to_remove[$key] != FALSE)
+        $fields[$elements[0]] = array();
+      if ($fields_to_remove[$key] != FALSE)
+        array_push($fields[$elements[0]], $elements[1]);
+    }
   }
   
   // any node specific fields which should be removed ..argg
