Reputation: 143
I have an issue with SMARTY after update to the latest version. When I use IF/ELSE statement, and it should display 0, it doesn't display anything:
template.tpl:
var xxxF = {{if false}}1{{else}}0{{/if}};
var xxxT = {{if true}}1{{else}}0{{/if}};
result: (rendered source):
var xxxF = ;
var xxxT = 1;
Imo, it should be:
var xxxF = 0;
var xxxT = 1;
What's wrong?
Upvotes: 0
Views: 244
Reputation: 143
I'm not sure what exactly was the source of the issue, but on the compiled file generated by Smarty in templates_c
I noticed the version of Smarty was 3.1.28, not the latest (3.1.29).
After I updated it to the latest version, the issue is gone and now it works fine.
Thank you for your comments, all of them leaded me to the place where I was able to fix it.
Upvotes: 1