Tpl::register_callable(): fix registering function

This commit is contained in:
Benjamin Renard 2024-12-16 17:52:13 +01:00
parent 8f90854f0f
commit d642f3c9dd
Signed by: bn8
GPG key ID: 3E2E1CE1907115BC

View file

@ -272,8 +272,8 @@ class Tpl {
}
else {
$function = new \ReflectionFunction($callable);
$default_smarty_function_name = "smarty_$function";
$default_smarty_name = $callable;
$default_smarty_function_name = sprintf("smarty_%s", $function->getName());
$default_smarty_name = $function->getName();
$callable_txt = $callable;
$params = $function->getParameters();
}