summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruwetews <uwe.tews@googlemail.com>2016-01-28 05:34:41 +0100
committeruwetews <uwe.tews@googlemail.com>2016-01-28 05:34:41 +0100
commita687a127c44e5f6689189a3b6c1e8bc7daebd076 (patch)
treef2cc24c5a36a7ddc6e049f0537d35d7779e0c28a
parent193163be29c012d25c79bf7a8d96195d6c17dcf9 (diff)
downloadsmarty-a687a127c44e5f6689189a3b6c1e8bc7daebd076.tar.gz
smarty-a687a127c44e5f6689189a3b6c1e8bc7daebd076.tar.bz2
smarty-a687a127c44e5f6689189a3b6c1e8bc7daebd076.zip
- 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
-rw-r--r--change_log.txt1
-rw-r--r--libs/sysplugins/smarty_internal_templatebase.php2
2 files changed, 2 insertions, 1 deletions
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;