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

index 7563743850319327d6b2c02ea2abf5c0a81e9773..25718b5819edbc63f08755d8258d2d2a73cd7343 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);