diff --git a/change_log.txt b/change_log.txt index 49080cbb..e28342fa 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,6 +1,7 @@  ===== 3.1.30-dev ===== (xx.xx.xx) 28.01.2016 - bugfix allow windows network filepath or wrapper (forum topic 25876) https://github.com/smarty-php/smarty/issues/170 + - bugfix if fetch('foo.tpl') is called on a template object the $parent parameter should default to the calling template object https://github.com/smarty-php/smarty/issues/152 27.01.2016 - revert bugfix compiling {section} did create warning diff --git a/libs/sysplugins/smarty_internal_templatebase.php b/libs/sysplugins/smarty_internal_templatebase.php index 3c05246c..0b4812d6 100644 --- a/libs/sysplugins/smarty_internal_templatebase.php +++ b/libs/sysplugins/smarty_internal_templatebase.php @@ -164,7 +164,7 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data } else { // get template object /* @var Smarty_Internal_Template $template */ - $template = $smarty->createTemplate($template, $cache_id, $compile_id, $parent, false); + $template = $smarty->createTemplate($template, $cache_id, $compile_id, $parent ? $parent : $this, false); if ($this->_objType == 1) { // set caching in template object $template->caching = $this->caching;