|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
schildi Smarty Regular
Joined: 11 Mar 2005 Posts: 81
|
Posted: Tue Sep 28, 2010 12:21 pm Post subject: exception in block func after update from 2.6.26 to 3.0 RC3 |
|
|
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 |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Tue Sep 28, 2010 4:03 pm Post subject: |
|
|
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 |
|
schildi Smarty Regular
Joined: 11 Mar 2005 Posts: 81
|
Posted: Tue Sep 28, 2010 6:01 pm Post subject: thanks |
|
|
you are right. i have a function named 'src'.
so this is not possible anymore?...
well - it doesnt make sense |
|
Back to top |
|
|
|
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
|