From 694d6ddcc2aa456f1fc6e6bd24b904a1ef2bb896 Mon Sep 17 00:00:00 2001 From: messju Date: Sat, 22 Apr 2006 08:16:57 +0000 Subject: [PATCH] fix handling of block-methods of registered objects thanks to El Hombre Gris --- NEWS | 3 +++ libs/Smarty_Compiler.class.php | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index a5768597..640f8b0e 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +- fix handling of block-methods of registered objects (El Hombre Gris, + messju) + Version 2.6.13 (March 9th, 2006) -------------------------------- diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index d0d5db08..f51ab288 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -880,9 +880,9 @@ class Smarty_Compiler extends Smarty { $prefix .= "while (\$_block_repeat) { ob_start();"; $return = null; $postfix = ''; - } else { - $prefix = "\$_obj_block_content = ob_get_contents(); ob_end_clean(); "; - $return = "\$_block_repeat=false; \$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], \$_obj_block_content, \$this, \$_block_repeat)"; + } else { + $prefix = "\$_obj_block_content = ob_get_contents(); ob_end_clean(); \$_block_repeat=false;"; + $return = "\$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], \$_obj_block_content, \$this, \$_block_repeat)"; $postfix = "} array_pop(\$this->_tag_stack);"; } } else {