- added error message for illegal variable file attributes at {extends...} tags

This commit is contained in:
uwe.tews@googlemail.com
2010-11-22 22:03:47 +00:00
parent 1153ea5a5a
commit c0130d5d34
2 changed files with 4 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
22/11/2010
- bugfix on template inheritance when an {extends} tag was inserted by a prefilter
- added error message for illegal variable file attributes at {extends...} tags
===== Smarty 3.0.5 =====

View File

@@ -40,6 +40,9 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_CompileBase {
$_smarty_tpl = $compiler->template;
$include_file = null;
if (strpos($_attr['file'],'$_tmp') !== false) {
$this->compiler->trigger_template_error('illegal value for file attribute', $this->compiler->lex->taglineno);
}
eval('$include_file = ' . $_attr['file'] . ';');
// create template object
$_template = new $compiler->smarty->template_class($include_file, $this->smarty, $compiler->template);