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

Bug: modifiers and {function}

 
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 -> Smarty 3
View previous topic :: View next topic  
Author Message
footplus
Smarty n00b


Joined: 05 Mar 2010
Posts: 1

PostPosted: Fri Mar 05, 2010 1:30 pm    Post subject: Bug: modifiers and {function} Reply with quote

Hi guys,

I'm using smarty3.0b7.

If I put the following in a template, I get an error:

Code:

{function name="x"}
    {$test|escape}
{/function}
{1|escape}


Code:

Fatal error: Call to undefined function smarty_modifier_escape()

It seems that the compiler sees that the function uses the escape modifier, and requires the modifier at the moment the function is called. It then marks the modifier as already included.

But it does not take into account the fact that the modifier may be used elsewhere before the function is actually used.

My current workaround is :

Code:
{""|escape}

before the function declaration, but that's not ideal :p

Thanks for the good work on this project Smile
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Fri Mar 05, 2010 3:14 pm    Post subject: Reply with quote

This has been fixed already in the SVN version.
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 -> 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