summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--change_log.txt1
-rw-r--r--libs/sysplugins/smarty_internal_templatebase.php5
2 files changed, 3 insertions, 3 deletions
diff --git a/change_log.txt b/change_log.txt
index 2164a66e..f10d5595 100644
--- a/change_log.txt
+++ b/change_log.txt
@@ -6,6 +6,7 @@
- bugfix html_options plugin did not handle object values properly (Issue #49, Forum Topic 20049)
- improvement html_checkboxes and html_radios to accept null- and object values, and label_ids attribute
- improvement removed some unnecessary count()s
+- bugfix parent pointer was not set when fetch() for other template was called on template object
06.10.2011
- bugfix switch lexer internals depending on mbstring.func_overload
diff --git a/libs/sysplugins/smarty_internal_templatebase.php b/libs/sysplugins/smarty_internal_templatebase.php
index 6a331738..85245039 100644
--- a/libs/sysplugins/smarty_internal_templatebase.php
+++ b/libs/sysplugins/smarty_internal_templatebase.php
@@ -38,14 +38,13 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data {
$parent = $cache_id;
$cache_id = null;
}
- if ($parent === null && $this instanceof Smarty) {
- // get default Smarty data object
+ if ($parent === null && ($this instanceof Smarty || is_string($template))) {
$parent = $this;
}
// create template object if necessary
$_template = ($template instanceof $this->template_class)
? $template
- : $this->createTemplate($template, $cache_id, $compile_id, $parent, false);
+ : $this->smarty->createTemplate($template, $cache_id, $compile_id, $parent, false);
// merge all variable scopes into template
if ($merge_tpl_vars) {
// save local variables