- bugfix a variable file name at {extends} tag did fail (forum topic 24618)

This commit is contained in:
Uwe.Tews@googlemail.com
2013-10-20 15:27:35 +00:00
parent fccd80818b
commit 8342cf45f3
2 changed files with 7 additions and 2 deletions

View File

@@ -1,4 +1,7 @@
===== trunk =====
20.10.2013
- bugfix a variable file name at {extends} tag did fail (forum topic 24618)
14.10.2013
- bugfix yesterdays fix could result in an undefined variable

View File

@@ -51,9 +51,11 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_CompileBase
$compiler->trigger_template_error('illegal value for file attribute', $compiler->lex->taglineno);
}
$name = trim($_attr['file'],"\"'");
$name = $_attr['file'];
$_smarty_tpl = $compiler->template;
eval("\$tpl_name = $name;");
// create template object
$_template = new $compiler->smarty->template_class($name, $compiler->smarty, $compiler->template);
$_template = new $compiler->smarty->template_class($tpl_name, $compiler->smarty, $compiler->template);
// check for recursion
$uid = $_template->source->uid;
if (isset($compiler->extends_uid[$uid])) {