mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
- bugfix a variable file name at {extends} tag did fail (forum topic 24618)
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
===== trunk =====
|
===== trunk =====
|
||||||
|
20.10.2013
|
||||||
|
- bugfix a variable file name at {extends} tag did fail (forum topic 24618)
|
||||||
|
|
||||||
14.10.2013
|
14.10.2013
|
||||||
- bugfix yesterdays fix could result in an undefined variable
|
- bugfix yesterdays fix could result in an undefined variable
|
||||||
|
|
||||||
|
@@ -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);
|
$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
|
// 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
|
// check for recursion
|
||||||
$uid = $_template->source->uid;
|
$uid = $_template->source->uid;
|
||||||
if (isset($compiler->extends_uid[$uid])) {
|
if (isset($compiler->extends_uid[$uid])) {
|
||||||
|
Reference in New Issue
Block a user