|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
SmileCold Smarty n00b
Joined: 21 Jan 2016 Posts: 2
|
Posted: Thu Jan 21, 2016 9:36 am Post subject: Issue with echoing '0' |
|
|
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 |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Thu Jan 21, 2016 1:11 pm Post subject: |
|
|
Wonderful bug report.
No reproduction code, no version information. |
|
Back to top |
|
SmileCold Smarty n00b
Joined: 21 Jan 2016 Posts: 2
|
Posted: Fri Jan 22, 2016 8:15 am Post subject: |
|
|
Huh, sorry
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 |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Fri Jan 22, 2016 2:47 pm Post subject: |
|
|
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 |
|
|
|
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
|