Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Issue with echoing '0'

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
SmileCold
Smarty n00b


Joined: 21 Jan 2016
Posts: 2

PostPosted: Thu Jan 21, 2016 9:36 am    Post subject: Issue with echoing '0' Reply with quote

Hi,

Today I found a very strange issue with echoing '0' (zero) in template using {if} statement.
For example: {if 0 LT 1}0{if}
it simply renders '' (empty output) and it should be fixed.
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Thu Jan 21, 2016 1:11 pm    Post subject: Reply with quote

Wonderful bug report.
No reproduction code, no version information.
Back to top
View user's profile Send private message
SmileCold
Smarty n00b


Joined: 21 Jan 2016
Posts: 2

PostPosted: Fri Jan 22, 2016 8:15 am    Post subject: Reply with quote

Huh, sorry Smile
It was Smarty 3.1.28, with a simple to reproduce code:
{if TRUE}0{if}
But seems fixed in 3.1.29, so bug is closed.
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Fri Jan 22, 2016 2:47 pm    Post subject: Reply with quote

That's a better case, since "{if 0 LT 1}0{if}" is essentially turned down to "{if 0}0{if}". Which doesn't make sense.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Bugs All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP