You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was updating smarty v4.3.4 to v4.5.5 and this deprecation notice started popping up:
Deprecated: Using unregistered function "strpos" in a template is deprecated and will be removed in a future release. Use Smarty::registerPlugin to explicitly register a custom modifier. in smarty4/sysplugins/smarty_internal_templatecompilerbase.php on line 665
When updating from v3 to v4, I've created bunch of modifier functions in custom plugins folder, eg myplugins/modifier.strpos.php:
I was updating smarty v4.3.4 to v4.5.5 and this deprecation notice started popping up:
When updating from v3 to v4, I've created bunch of modifier functions in custom plugins folder, eg
myplugins/modifier.strpos.php
:I registered myplugins folder with
addPluginsDir
and everything worked.Now on v4.5.5, if
$smarty->force_compile = true;
then notices pop up.They go away if I:
a) set
$smarty->force_compile = false
or
b) register manually those modifiers like this
I tried to wrap my head around #813 and #967 but cannot find what is "new proper way" of dealing with custom modifiers.
Why are custom modifier ignored if force_compile is set to true?
The text was updated successfully, but these errors were encountered: