smarty
smarty copied to clipboard
debug.tpl uses {Smarty::SMARTY_VERSION} but compiler thinks this is a disallowed static method call
Steps to reproduce:
- add
{debug}
to your .tpl file - call
$smarty->display('the_file.tpl');
Note the deprecation notice:
Using unregistered static method "Smarty::SMARTY_VERSION" in a template is deprecated and will be removed in a future release. Use Smarty::registerClass to explicitly register a class for access. in vendor/smarty/smarty/libs/sysplugins/smarty_internal_templateparser.php on line 2430
I'm on Smarty Version 4.5.4.
https://github.com/smarty-php/smarty/blob/a1b4c9c551d01ff63220f053966c7aaa9053f89d/src/debug.tpl#L111
Suggest changing the above line to use {$smarty.version}
, unless it's better to register the class -- in which case it should get registered within smarty_internal_debug.php