--- flexinode.module	2005-11-30 02:01:57.000000000 +0100
+++ flexinode_new.module	2006-01-14 18:15:45.000000000 +0100
@@ -754,15 +777,23 @@
 /**
  * Invoke a field hook for all field types.
  */
-function flexinode_invoke_all($hook, $a1 = NULL, $a2 = NULL, $a3 = NULL) {
-  $result = array();
+function flexinode_invoke_all() {
+  $args = func_get_args();
+  $hook = array_shift($args);
+  $return = array();
   foreach (flexinode_field_types() as $type) {
     $function = 'flexinode_field_'. $type .'_'. $hook;
     if (function_exists($function)) {
-      $result = array_merge($result, $function($a1, $a2, $a3));
+      $result = call_user_func_array($function, $args);
+      if (is_array($result)) {
+        $return = array_merge($return, $result);
+      }
+      else if (isset($result)) {
+        $return[] = $result;
+      }
     }
   }
-  return $result;
+  return $return;
 }
 
 /**
