|
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 |
MizHguN Smarty n00b
Joined: 14 Apr 2014 Posts: 4
|
Posted: Mon Apr 14, 2014 11:39 am Post subject: Delimeters bug |
|
|
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 |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Mon Apr 14, 2014 2:27 pm Post subject: |
|
|
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 |
|
MizHguN Smarty n00b
Joined: 14 Apr 2014 Posts: 4
|
Posted: Tue Apr 15, 2014 4:18 am Post subject: |
|
|
Why [-$GF.f.$eform.name-] do not work ? |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Tue Apr 15, 2014 7:17 pm Post subject: |
|
|
[-$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 |
|
|
|
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
|