|
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 |
Xanderby Smarty n00b
Joined: 10 Nov 2009 Posts: 4
|
Posted: Tue Nov 10, 2009 2:43 pm Post subject: Left/Right Delimiters |
|
|
I've been working on migrating some code in a framework I'm developing from Smarty 2 to Smart 3 and for the most part things seem to be going okay (though the auto loader conflict required me to change a line in class Smarty since the spl_autoload_register fix didn't work). That said, one bug/problem I have found and can't find an obvious workaround for is the left/right delimiters that worked in Smart 2 no longer work in Smarty 3 for me.
What I'm using are:
Code: |
$this->left_delimiter = '/*<!--{';
$this->right_delimiter = '}-->*/';
|
Rather hackish and ugly, but a lot of old templates expect these delimiters now.
The error I'm getting is the following:
Code: | [ReqID:2ee97c] 2009.11.10 05:00:28am UTC [EMERGENCY] RUN-TIME WARNING preg_match(): Unknown modifier '\'
/opt/local/lib/php/Smarty_3_Beta/sysplugins/smarty_internal_templatelexer.php 135
[ReqID:2ee97c] 2009.11.10 05:00:28am UTC [EMERGENCY] [File: /egloo/index.php Line: 41] Programmer Error: Request Handler
Threw Unknown Exception\n\tUnexpected input at line1: /
|
Is this a bug or as of Smarty 3 is this behavior no longer supported? |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Tue Nov 10, 2009 4:05 pm Post subject: |
|
|
The preg_quote on the delimiters has been fixed.
It's in the SVN now. |
|
Back to top |
|
Xanderby Smarty n00b
Joined: 10 Nov 2009 Posts: 4
|
Posted: Tue Nov 10, 2009 5:47 pm Post subject: |
|
|
Cool! Thanks! |
|
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
|