From 1ed4808bd98ad6436962b5b1635623cb9967f4f1 Mon Sep 17 00:00:00 2001 From: Uwe Tews Date: Thu, 6 Aug 2015 19:14:55 +0200 Subject: [PATCH] check parent object type --- libs/sysplugins/smarty_internal_template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/sysplugins/smarty_internal_template.php b/libs/sysplugins/smarty_internal_template.php index c39c29f6..4a796fa0 100644 --- a/libs/sysplugins/smarty_internal_template.php +++ b/libs/sysplugins/smarty_internal_template.php @@ -300,7 +300,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase Smarty_Internal_Debug::end_cache($this); } } else { - if (!empty($this->properties['nocache_hash']) && !empty($this->parent->properties['nocache_hash'])) { + if ($this->parent instanceof Smarty_Internal_Template && !empty($this->properties['nocache_hash']) && !empty($this->parent->properties['nocache_hash'])) { // replace nocache_hash $content = str_replace("{$this->properties['nocache_hash']}", $this->parent->properties['nocache_hash'], $content); $this->parent->has_nocache_code = $this->parent->has_nocache_code || $this->has_nocache_code;