diff --git a/change_log.txt b/change_log.txt index 9ecb8390..0e29a182 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@  ===== 3.1.30-dev ===== (xx.xx.xx) + 26.07.2016 + - optimization unneeded loading of compiled resource + 24.07.2016 - regression this->addPluginsDir('/abs/path/to/dir') adding absolute path without trailing '/' did fail https://github.com/smarty-php/smarty/issues/260 diff --git a/libs/sysplugins/smarty_internal_template.php b/libs/sysplugins/smarty_internal_template.php index c4cfc75c..8fa2f438 100644 --- a/libs/sysplugins/smarty_internal_template.php +++ b/libs/sysplugins/smarty_internal_template.php @@ -223,10 +223,12 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase if (!empty($this->tpl_function)) { $this->parent->tpl_function = array_merge($this->parent->tpl_function, $this->tpl_function); } - foreach ($this->compiled->required_plugins as $code => $tmp1) { - foreach ($tmp1 as $name => $tmp) { - foreach ($tmp as $type => $data) { - $this->parent->compiled->required_plugins[ $code ][ $name ][ $type ] = $data; + if (isset($this->compiled)) { + foreach ($this->compiled->required_plugins as $code => $tmp1) { + foreach ($tmp1 as $name => $tmp) { + foreach ($tmp as $type => $data) { + $this->parent->compiled->required_plugins[ $code ][ $name ][ $type ] = $data; + } } } }