From 8a9b52e9757e287b2b17027288b181bd7f1b853f Mon Sep 17 00:00:00 2001 From: uwetews Date: Sat, 15 Aug 2015 18:32:27 +0200 Subject: [PATCH] optimize $properties array --- libs/sysplugins/smarty_internal_extension_codeframe.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/sysplugins/smarty_internal_extension_codeframe.php b/libs/sysplugins/smarty_internal_extension_codeframe.php index 155bcc27..484ee257 100644 --- a/libs/sysplugins/smarty_internal_extension_codeframe.php +++ b/libs/sysplugins/smarty_internal_extension_codeframe.php @@ -29,11 +29,14 @@ class Smarty_Internal_Extension_CodeFrame $properties['has_nocache_code'] = $_template->compiled->has_nocache_code; $properties['version'] = Smarty::SMARTY_VERSION; $properties['unifunc'] = 'content_' . str_replace(array('.', ','), '_', uniqid('', true)); - $properties['tpl_function'] = $_template->tpl_function; + if (!empty($_template->tpl_function)) { + $properties['tpl_function'] = $_template->tpl_function; + } if (!$cache) { $properties['file_dependency'] = $_template->compiled->file_dependency; } else { $properties['file_dependency'] = $_template->cached->file_dependency; + $properties['cache_lifetime'] = $_template->cache_lifetime; } $output = "compiled->nocache_hash}%%*/\n";