]> granicus.if.org Git - php/commitdiff
Fix bug #19525
authorZeev Suraski <zeev@php.net>
Mon, 23 Sep 2002 14:18:42 +0000 (14:18 +0000)
committerZeev Suraski <zeev@php.net>
Mon, 23 Sep 2002 14:18:42 +0000 (14:18 +0000)
main/output.c

index 88928bc62facaac7980019fee9132d7bbadd82ff..c55286e3857e3f741c77f90b54a6f01e0facf5e8 100644 (file)
@@ -120,6 +120,12 @@ PHPAPI int php_start_ob_buffer(zval *output_handler, uint chunk_size, zend_bool
        uint initial_size, block_size;
 
        if (OG(ob_lock)) {
+               if (SG(headers_sent) && !SG(request_info).headers_only) {
+                       OG(php_body_write) = php_ub_body_write_no_header;
+               } else {
+                       OG(php_body_write) = php_ub_body_write;
+               }
+               OG(ob_nesting_level) = 0;
                php_error_docref("ref.outcontrol" TSRMLS_CC, E_ERROR, "Cannot use output buffering in output buffering display handlers");
                return FAILURE;
        }