From 7d40a092aca1cc791883dd9a9eaf91032be154da Mon Sep 17 00:00:00 2001 From: Simon Wisselink Date: Mon, 18 Mar 2024 11:43:51 +0100 Subject: [PATCH] do not trigger deprecation for 4 php native functions that will still be supported in v5 --- .../smarty_internal_compile_private_modifier.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libs/sysplugins/smarty_internal_compile_private_modifier.php b/libs/sysplugins/smarty_internal_compile_private_modifier.php index 1e7cd42db..31fd6e1da 100644 --- a/libs/sysplugins/smarty_internal_compile_private_modifier.php +++ b/libs/sysplugins/smarty_internal_compile_private_modifier.php @@ -109,9 +109,11 @@ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $ if (!is_object($compiler->smarty->security_policy) || $compiler->smarty->security_policy->isTrustedPhpModifier($modifier, $compiler) ) { - trigger_error('Using unregistered function "' . $modifier . '" in a template is deprecated and will be ' . - 'removed in a future release. Use Smarty::registerPlugin to explicitly register ' . - 'a custom modifier.', E_USER_DEPRECATED); + if (!in_array($modifier, ['time', 'join', 'is_array', 'in_array'])) { + trigger_error('Using unregistered function "' . $modifier . '" in a template is deprecated and will be ' . + 'removed in a future release. Use Smarty::registerPlugin to explicitly register ' . + 'a custom modifier.', E_USER_DEPRECATED); + } $output = "{$modifier}({$params})"; } $compiler->known_modifier_type[ $modifier ] = $type;