]> granicus.if.org Git - php/commitdiff
fix HEAD problem: if some output is attempted in shutdown,
authorStanislav Malyshev <stas@php.net>
Wed, 20 Oct 2004 15:27:25 +0000 (15:27 +0000)
committerStanislav Malyshev <stas@php.net>
Wed, 20 Oct 2004 15:27:25 +0000 (15:27 +0000)
it bails out from shutdown sequence, which is bad

main/output.c

index 0f530942e065bc5f1865c33260f456547577cec8..bc3bf52627c235631437a67bdf49731f2bf0becf 100644 (file)
@@ -703,6 +703,9 @@ static int php_ub_body_write(const char *str, uint str_length TSRMLS_DC)
        int result = 0;
 
        if (SG(request_info).headers_only) {
+               if(SG(headers_sent)) {
+                       return 0;
+               }
                php_header();
                zend_bailout();
        }