From ceb065f9ebb68978e1326f2f10d67eee93ac9dd1 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Fri, 8 Aug 2003 23:44:04 +0000 Subject: [PATCH] MFH: Fixed bug #24951 (ob_flush() needlessly destroys output handler). --- main/output.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main/output.c b/main/output.c index c029d32209..0f530942e0 100644 --- a/main/output.c +++ b/main/output.c @@ -247,7 +247,9 @@ PHPAPI void php_end_ob_buffer(zend_bool send_buffer, zend_bool just_flush TSRMLS } } OG(ob_lock) = 0; - zval_ptr_dtor(&OG(active_ob_buffer).output_handler); + if (!just_flush) { + zval_ptr_dtor(&OG(active_ob_buffer).output_handler); + } orig_buffer->refcount -=2; if (orig_buffer->refcount <= 0) { /* free the zval */ zval_dtor(orig_buffer); -- 2.50.1