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

Reserved word in function name???

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


Joined: 16 May 2014
Posts: 1

PostPosted: Fri May 16, 2014 4:12 pm    Post subject: Reserved word in function name??? Reply with quote

Hi all.

I have created a function:

Code:

function smarty_function_form_close()
{
    return '</form>';
}


When i trying to use it, i receive a Fatal Error: Syntax error in template ".\app\views\register.tpl" on line 100 "{form_close}" unknown tag "form_close".

When i rename the function to smarty_function_form_blah() and i use it in template everything is OK. Is it possible that the problem is in word "close" in function name?

Sorry for my poor english Smile
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Sat May 17, 2014 11:21 am    Post subject: Reply with quote

Indeed this is an undocumented restriction. Plugins should not end with 'close'. There is an ambiguity in the compiler with closing block tags.
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 -> Plugins 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