I'm getting the follow error in 1.5 after upgrading.

Invalid argument supplied for foreach() in /var/home/soul/wwwroot/soultracks.com/test/sites/all/modules/webform/webform.module on line 165

Yell if I can supply an other information

Comments

luti’s picture

Exactly the same with me (on just updated Drupal 5.3)

quicksketch’s picture

Status: Active » Fixed

Thanks, I've committed the following patch:

Index: webform.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/webform.module,v
retrieving revision 1.113.2.46
diff -u -r1.113.2.46 webform.module
--- webform.module	18 Oct 2007 06:49:56 -0000	1.113.2.46
+++ webform.module	18 Oct 2007 18:49:15 -0000
@@ -51,12 +51,14 @@
       }
       break;
   }
-  // Call help hooks in plugins:
-  $components = _webform_load_components();
-  foreach ($components as $component) {
-    $help_function = "_webform_help_". $component;
-    if (function_exists($help_function)) {
-      $output .= $help_function($section);
+  if (strstr($section, 'admin/settings/webform#')) {
+    // Call help hooks in plugins:
+    $components = _webform_load_components(TRUE);
+    foreach ($components as $component) {
+      $help_function = "_webform_help_". $component;
+      if (function_exists($help_function)) {
+        $output .= $help_function($section);
+      }
     }
   }
   return $output;
@@ -1722,9 +1724,7 @@
       }
     }
   }
+
   // Ensure only wanted components are returned, even all are loaded.
-  if (!$return_all) {
-    $return_list = array_intersect_assoc($component_list, $enabled_list);
-  }
-  return $return_list;
+  return $return_all ? $component_list : array_intersect_assoc($component_list, $enabled_list);
 }
quicksketch’s picture

If one of you would confirm the fix by trying out the latest dev version, I'll release 1.6 later today. Thanks!

luti’s picture

Seems to work now. Thank you.

quicksketch’s picture

Thanks, I've created the 1.6 release and it should be available momentarily.

Anonymous’s picture

Status: Fixed » Closed (fixed)