diff options
Diffstat (limited to 'includes/module.inc')
-rw-r--r-- | includes/module.inc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/includes/module.inc b/includes/module.inc index fb1b9d9b7..7edbf17a4 100644 --- a/includes/module.inc +++ b/includes/module.inc @@ -380,8 +380,9 @@ function module_implements($hook, $sort = FALSE, $refresh = FALSE) { */ function module_invoke() { $args = func_get_args(); - $module = array_shift($args); - $hook = array_shift($args); + $module = $args[0]; + $hook = $args[1]; + unset($args[0], $args[1]); $function = $module .'_'. $hook; if (module_hook($module, $hook)) { return call_user_func_array($function, $args); @@ -400,7 +401,8 @@ function module_invoke() { */ function module_invoke_all() { $args = func_get_args(); - $hook = array_shift($args); + $hook = $args[0]; + unset($args[0]); $return = array(); foreach (module_implements($hook) as $module) { $function = $module .'_'. $hook; |