diff options
author | Zeev Suraski <zeev@php.net> | 2000-02-04 14:54:30 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2000-02-04 14:54:30 +0000 |
commit | 8055da983011d27441fd560f39eea9bc0646580b (patch) | |
tree | 271815f6c0e72d661f2475504f96de8aa1b0a2e2 /main/SAPI.c | |
parent | b6197bcf902373c481eac2c5484954c3b3bd5f85 (diff) | |
download | php-git-8055da983011d27441fd560f39eea9bc0646580b.tar.gz |
Use the new state functions
@- If header information is sent after output has already been sent, the warning
@ message will now state the filename and line number at which the first output
@ was made (Zeev)
Diffstat (limited to 'main/SAPI.c')
-rw-r--r-- | main/SAPI.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/main/SAPI.c b/main/SAPI.c index 30d0db76b1..2da12e5b83 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -229,7 +229,15 @@ SAPI_API int sapi_add_header(char *header_line, uint header_line_len) SLS_FETCH(); if (SG(headers_sent)) { - sapi_module.sapi_error(E_WARNING, "Cannot add header information - headers already sent"); + char *output_start_filename = php_get_output_start_filename(); + int output_start_lineno = php_get_output_start_lineno(); + + if (output_start_filename) { + sapi_module.sapi_error(E_WARNING, "Cannot add header information - headers already sent by (output started at %s:%d)", + output_start_filename, output_start_lineno); + } else { + sapi_module.sapi_error(E_WARNING, "Cannot add header information - headers already sent"); + } efree(header_line); return FAILURE; } |