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

Delimeters bug

 
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
MizHguN
Smarty n00b


Joined: 14 Apr 2014
Posts: 4

PostPosted: Mon Apr 14, 2014 11:39 am    Post subject: Delimeters bug Reply with quote

Hello!

I am use smarty delimeters like this:
Code:
$smarty->left_delimiter = '[-';
$smarty->right_delimiter = '-]';


After one of the updates to the current time I started to get the following error:
Code:
Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "73a8c30f6487c4adfea209d34363ccaa111c84c0" on line 112 "[-$GF.f.[-$eform.name-]-]" - Unexpected "[", expected one of: "[-" , "$" , "identifier" , INTEGER <-- thrown in W:\home\saraffancom.loc\www\smarty\libs\sysplugins\smarty_internal_templatecompilerbase.php on line 112


Troubles in construtions like this: [-$GF.f.[-$eform.name-]-]

When I roll back to the previous version ( * SVN: $Id: Smarty.class.php 4742 2013-06-17 13:30:49Z Uwe.Tews@googlemail.com $), everything works ok.
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Mon Apr 14, 2014 2:27 pm    Post subject: Reply with quote

Your code looks very strange and wrong.
It should be
Code:
[-$GF.f[$eform.name]-]

or not mixing PHP and Smarty syntax
Code:
[-$GF['f'][$eform['name']]-]
Back to top
View user's profile Send private message
MizHguN
Smarty n00b


Joined: 14 Apr 2014
Posts: 4

PostPosted: Tue Apr 15, 2014 4:18 am    Post subject: Reply with quote

Why [-$GF.f.$eform.name-] do not work ?
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Tue Apr 15, 2014 7:17 pm    Post subject: Reply with quote

[-$GF.f.$eform.name-] converted to PHP systax is

Code:
[-$GF['f'][$eform]['name']-]

where $GF has 3 index levels


which is different from
Code:
[-$GF['f'][$eform['name']]-]

where $GF has 2 index levels and $eform itself is an array.
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