- 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:
uwetews
2016-11-19 07:34:06 +01:00
parent 05933749c0
commit 91af9d090a
3 changed files with 6 additions and 2 deletions

View File

@@ -1,4 +1,8 @@
===== 3.1.31-dev ===== (xx.xx.xx) ===== 3.1.31-dev ===== (xx.xx.xx)
19.11.2016
- 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
11.11.2016 11.11.2016
- bugfix when Smarty is using a cached template object on Smarty::fetch() or Smarty::isCached() the inheritance data - bugfix when Smarty is using a cached template object on Smarty::fetch() or Smarty::isCached() the inheritance data
must be removed https://github.com/smarty-php/smarty/issues/312 must be removed https://github.com/smarty-php/smarty/issues/312

View File

@@ -108,7 +108,7 @@ class Smarty extends Smarty_Internal_TemplateBase
/** /**
* smarty version * smarty version
*/ */
const SMARTY_VERSION = '3.1.31-dev/44'; const SMARTY_VERSION = '3.1.31-dev/45';
/** /**
* define variable scopes * define variable scopes

View File

@@ -129,7 +129,7 @@ class Smarty_Internal_Runtime_Inheritance
*/ */
public function instanceBlock(Smarty_Internal_Template $tpl, $className, $name, $tplIndex = null) 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 ])) { if (isset($this->childRoot[ $name ])) {
$block->child = $this->childRoot[ $name ]; $block->child = $this->childRoot[ $name ];
} }