]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #24951 (ob_flush() needlessly destroys output handler).
authorIlia Alshanetsky <iliaa@php.net>
Fri, 8 Aug 2003 23:44:04 +0000 (23:44 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 8 Aug 2003 23:44:04 +0000 (23:44 +0000)
main/output.c

index c029d32209d5ae5ea9eaeb319680228dc4ed261b..0f530942e065bc5f1865c33260f456547577cec8 100644 (file)
@@ -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);