- return error if headers have been already sent
authorMichael Wallner <mike@php.net>
Fri, 22 Jul 2005 09:45:56 +0000 (09:45 +0000)
committerMichael Wallner <mike@php.net>
Fri, 22 Jul 2005 09:45:56 +0000 (09:45 +0000)
http_response_object.c

index 1f2b58001cc8507d79e02ad7a4ddfe64801f7035..5ca8edd70fdb8f75a0039125f6efc1e517c43f36 100644 (file)
@@ -593,6 +593,7 @@ PHP_METHOD(HttpResponse, send)
                RETURN_FALSE;
        }
        if (SG(headers_sent)) {
+               http_error(E_WARNING, HTTP_E_HEADER, "Cannot send HttpResponse, headers have already been sent");
                RETURN_FALSE;
        }