From 665240acd3b4554b9caba3f025c5231647b02b32 Mon Sep 17 00:00:00 2001 From: g7sim <30436307+g7sim@users.noreply.github.com> Date: Wed, 8 Sep 2021 19:56:47 +0200 Subject: [PATCH] call_user_func_array($callback, array_values($args)); --- include/tool/Output.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/tool/Output.php b/include/tool/Output.php index 34cfa4b..2557818 100644 --- a/include/tool/Output.php +++ b/include/tool/Output.php @@ -846,7 +846,7 @@ namespace gp\tool{ if( !empty($info['method']) ){ if( method_exists($object, $info['method']) ){ - $args[0] = call_user_func_array([$object, $info['method']], $args); + $args[0] = call_user_func_array([$object, $info['method']], array_values($args)); }elseif( $has_script ){ self::ExecError(\CMS_NAME . ' Error: Addon hook method doesn\'t exist (1).', $info, 'method'); } @@ -876,7 +876,7 @@ namespace gp\tool{ } if( is_callable($callback) ){ - $args[0] = call_user_func_array($callback, $args); + $args[0] = call_user_func_array($callback, array_values($args)); }elseif( $has_script ){ self::ExecError(\CMS_NAME.' Error: Addon hook method doesn\'t exist (2).', $info, 'method'); }