Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug.tpl uses {Smarty::SMARTY_VERSION} but compiler thinks this is a disallowed static method call #1073

Closed
j-applese3d opened this issue Oct 16, 2024 · 1 comment

Comments

@j-applese3d
Copy link
Contributor

Steps to reproduce:

  1. add {debug} to your .tpl file
  2. 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.

<h1>Smarty {\Smarty\Smarty::SMARTY_VERSION} Debug Console

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

@wisskid
Copy link
Member

wisskid commented Dec 27, 2024

I'm on Smarty Version 4.5.4

Is that version number a typo? In v4 the line read {Smarty::SMARTY_VERSION}, right?

wisskid added a commit that referenced this issue Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants