From 2a1badfebb37f7e9eabcd8c8d25d6ea65d162ea6 Mon Sep 17 00:00:00 2001 From: Uwe Tews Date: Thu, 4 Jun 2015 02:39:26 +0200 Subject: [PATCH] - bugfix possible error message on unset() while compiling {block} tags https://github.com/smarty-php/smarty/issues/46 --- change_log.txt | 5 ++++- libs/sysplugins/smarty_internal_compile_block.php | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/change_log.txt b/change_log.txt index cc394bf6..f8da44fd 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,5 +1,8 @@  ===== 3.1.25-dev===== (xx.xx.2015) - 01.06.2105 + 04.06.2015 + - bugfix possible error message on unset() while compiling {block} tags https://github.com/smarty-php/smarty/issues/46 + + 01.06.2015 - bugfix including template variables broken since 3.1.22 https://github.com/smarty-php/smarty/issues/47 27.05.2015 diff --git a/libs/sysplugins/smarty_internal_compile_block.php b/libs/sysplugins/smarty_internal_compile_block.php index 39e452e1..93c90a91 100644 --- a/libs/sysplugins/smarty_internal_compile_block.php +++ b/libs/sysplugins/smarty_internal_compile_block.php @@ -334,7 +334,9 @@ class Smarty_Internal_Compile_Blockclose extends Smarty_Internal_CompileBase $_output = $compiler->parser->current_buffer->to_smarty_php(); } } - unset($compiler->template->block_data[$_name]['compiled']); + if (isset($compiler->template->block_data[$_name]['compiled'])) { + unset($compiler->template->block_data[$_name]['compiled']); + } // reset flags $compiler->parser->current_buffer = $saved_data[2]; if ($compiler->nocache) {