|
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 |
matija@nivas.hr Smarty n00b
Joined: 09 Jan 2019 Posts: 2
|
Posted: Wed Jan 09, 2019 3:32 pm Post subject: ForEach unrecognized Syntax Error on double brackets {{}} |
|
|
I have "{" and "}" characters set as my delimiters. I made a syntax error and closed my foreach loop with double brackets.
Code: |
{ foreach $var as $vars }
{* code here *}
{{ /foreach }} // <---- SYNTAX ERROR
|
Not only did Smarty not warn me of the error but it parsed the code and executed. Needless to say this was hard to diagnose because the error spilled out into multiple templates and even my normal php scripts and that was due to the foreach loop using output buffer layers for each iteration that when unproperly closed and not handled by smarty as error get carried over to general scripts. |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
|
Back to top |
|
matija@nivas.hr Smarty n00b
Joined: 09 Jan 2019 Posts: 2
|
|
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
|