Closed wxiaoguang closed 1 year ago
Do you know what the latest version is where your syntax still works? Thanks.
It's not a regression, at least not a recent one. I tested it against 3.1.46 with the same result. You're probably coming from Smarty v2? The v2 > v3 upgrade guide doesn't specifically mention your codestyle, but it does mention that Smarty 3 has a new syntax, which is stricter. It also mentions whitespace from being important now. Since v3 has been out over a decade now, we will stick to the v3 syntax.
Thank you for your help. I think you are right. The project is very old and was using Smarty v2 long time ago. It has been running with Smarty v3/v4 for long time. Maybe the template with the old syntax is seldom used, so I didn't notice the error until today.
I will do more checks, thank you again.
Before it works:
But with 4.3.1, it reports error:
Removing the spaces then
{$var|string_format:"%.2f"}
works in 4.3.1.It looks like a regression?