Fixed that using count() would trigger a deprecation notice. (#1054)

This commit is contained in:
Simon Wisselink
2024-08-14 10:58:02 +02:00
committed by GitHub
parent 9fc96a13db
commit 2adb8801a5
3 changed files with 4 additions and 1 deletions

View File

@@ -658,7 +658,7 @@ abstract class Smarty_Internal_TemplateCompilerBase
if (
!$this->smarty->loadPlugin('smarty_modifiercompiler_' . $name)
&& !isset($this->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][$name])
&& !in_array($name, ['time', 'join', 'is_array', 'in_array'])
&& !in_array($name, ['time', 'join', 'is_array', 'in_array', 'count'])
) {
trigger_error('Using unregistered function "' . $name . '" in a template is deprecated and will be ' .
'removed in a future release. Use Smarty::registerPlugin to explicitly register ' .