I migrated from smarty v3.1.29
to v3.1.33
and my registered plugins stopped working. Why?
I used this syntax:
$this -> registerPlugin ( "function", "tpl_func", "php_func" );
The behaviour goes wrong only with php 7.0
. With php 7.3.14
it still works fine.
The problem is not where you call the function but where you define it.
In older versions of smarty the following syntax did work:
In the newer versions this is incorrect. You should use this one (remove the
&
from the second argument):The same holds for smarty
block
s and smartyfunction
s as well.