mirror of
https://github.com/smarty-php/smarty.git
synced 2025-12-16 02:28:31 +01:00
- bugfix inheritance root child templates containing nested {block}{/block} could call sub-bock content from parent
template https://github.com/smarty-php/smarty/issues/317
This commit is contained in:
@@ -129,7 +129,7 @@ class Smarty_Internal_Runtime_Inheritance
|
||||
*/
|
||||
public function instanceBlock(Smarty_Internal_Template $tpl, $className, $name, $tplIndex = null)
|
||||
{
|
||||
$block = new $className($name, $tplIndex ? $tplIndex : $this->tplIndex);
|
||||
$block = new $className($name, isset($tplIndex) ? $tplIndex : $this->tplIndex);
|
||||
if (isset($this->childRoot[ $name ])) {
|
||||
$block->child = $this->childRoot[ $name ];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user