Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Left/Right Delimiters

 
Post new topic   Reply to topic    Smarty Forum Index -> Smarty 3
View previous topic :: View next topic  
Author Message
Xanderby
Smarty n00b


Joined: 10 Nov 2009
Posts: 4

PostPosted: Tue Nov 10, 2009 2:43 pm    Post subject: Left/Right Delimiters Reply with quote

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
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Tue Nov 10, 2009 4:05 pm    Post subject: Reply with quote

The preg_quote on the delimiters has been fixed.
It's in the SVN now.
Back to top
View user's profile Send private message
Xanderby
Smarty n00b


Joined: 10 Nov 2009
Posts: 4

PostPosted: Tue Nov 10, 2009 5:47 pm    Post subject: Reply with quote

Cool! Thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Smarty 3 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