--- module.inc?rev=1.65 2005-02-22 22:25:50.000000000 +0100 +++ module.inc 2005-02-22 23:45:28.000000000 +0100 @@ -172,10 +172,13 @@ function module_implements($hook) { * @return * The return value of the hook implementation. */ -function module_invoke($module, $hook, $a1 = NULL, $a2 = NULL, $a3 = NULL, $a4 = NULL) { +function module_invoke() { + $args = func_get_args(); + $module = array_shift($args); + $hook = array_shift($args); $function = $module .'_'. $hook; if (function_exists($function)) { - return $function($a1, $a2, $a3, $a4); + return call_user_func_array($function, $args); } }