smarty icon indicating copy to clipboard operation
smarty copied to clipboard

no deprecated warning for time with smarty4

Open shadowwa opened this issue 9 months ago • 2 comments

with smarty 4 php function time() can be used in templates and does not display any warning

{$duration = date(time()) - $uptimeLastActiv}

since it's not working anymore with smarty 5, I expected a warning to be display like:

PHP Deprecated:  Using unregistered function "time" in a template is deprecated and will be removed in a future release. Use Smarty::registerPlugin to explicitly register a custom modifier.

to allow developers to change their template before migrating to smarty 5

shadowwa avatar Mar 16 '25 11:03 shadowwa

I agree. You are saying it doesn't?

wisskid avatar Mar 16 '25 12:03 wisskid

yes, it does not display any warning. If I apply modification from PR #1115, it correctly display a warning a the compilation time like other php functions.

shadowwa avatar Mar 16 '25 14:03 shadowwa