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

Reserved word in function name???

 
Post new topic   Reply to topic    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: 5067
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:   
Post new topic   Reply to topic    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