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

heisenbug in smarty !

 
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
sm@rty
Smarty Regular


Joined: 01 Oct 2014
Posts: 65

PostPosted: Sat Mar 14, 2015 12:46 pm    Post subject: heisenbug in smarty ! Reply with quote

hi

i find a heisenbug in smarty.

this bug occurred yesterday but suddenly hidden and i can't find.

now today find and 1 hours lasted find main structure.

php code
Code:
class test_obj{
   function a(){}
};
function test_obj(){
   return new test_obj;
};


smarty code :
Code:
{$obj= test_obj() nocache}
{$a = $obj->a()}
{function name=func1}
{if $a}
   {if 1 == 0}
      {if 0}{require 'tpl'}{/if}
   {/if}
{/if}
{/function}

OR
Code:
{$a = 1 nocache}
{if $a}
{nocache}sss{/nocache}
{/if}

OR
Code:
{if $a == 1 nocache}
{nocache}{/nocache}
{/if}

result :
PHP Parse error: syntax error, unexpected '}' in ...\smarty\data\compile\24^43ecfc91a0cd0777ab8b0b63707db0e8402a86b0_0.mysql.%main%.php on line 74
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Sat Mar 14, 2015 2:19 pm    Post subject: Reply with quote

This bug was already fixed but not yet uploaded. It's now done.
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