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

exception in block func after update from 2.6.26 to 3.0 RC3

 
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 -> General
View previous topic :: View next topic  
Author Message
schildi
Smarty Regular


Joined: 11 Mar 2005
Posts: 81

PostPosted: Tue Sep 28, 2010 12:21 pm    Post subject: exception in block func after update from 2.6.26 to 3.0 RC3 Reply with quote

this exception is thrown, since i updated to smarty 3.0 RC3:

Code:
[...] Fatal error: Uncaught exception 'Exception' with message 'Syntax Error in template "..." on line 98 " {src test="test"}test{/src} " unexpected closing tag' in [...]


template code snippet:

Code:

{src test="test"}test{/src}


this is the block-function code:

Code:

function smarty_block_src($params, $content, &$smarty, &$repeat)
{
   if (isset($content))
   {
      empty($params['subfolder']) ? $subfolder = "" : $subfolder = $params['subfolder'];
      if(!empty($subfolder) && $subfolder{$subfolder.length-1} != "/") $subfolder.="/";
      if(empty($params['type'])) $smarty->trigger_error("smarty_function_src: missing required parameter 'type'");
      else if($params['type'] == "img")
         return HTML_IMG_DIR.$subfolder.$content;
      else if($params['type'] == "css")
         return HTML_CSS_DIR.$subfolder.$content;
      else if($params['type'] == "js")
         return HTML_JS_DIR.$subfolder.$content;
      else if($params['type'] == "dl")
         return HTML_DL_DIR.$subfolder.$content;
      else
         $smarty->trigger_error("smarty_function_src: parameter 'type' has an invalid value (valid values: image, css, js)");
   }
}


i have no idea, why...

can anybody help?...
Back to top
View user's profile Send private message Send e-mail
U.Tews
Administrator


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

PostPosted: Tue Sep 28, 2010 4:03 pm    Post subject: Reply with quote

Looks like that you have also also a function or compiler plugin for "src" in your pluginfolders so that the tag name "src" is not unique.
Back to top
View user's profile Send private message
schildi
Smarty Regular


Joined: 11 Mar 2005
Posts: 81

PostPosted: Tue Sep 28, 2010 6:01 pm    Post subject: thanks Reply with quote

you are right. i have a function named 'src'.

so this is not possible anymore?...

well - it doesnt make sense Smile
Back to top
View user's profile Send private message Send e-mail
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 -> General 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