]> granicus.if.org Git - php/commitdiff
- Fixed a bug in reporting start-up errors with the CLI: No HTTP header shall
authorDerick Rethans <derick@php.net>
Mon, 26 May 2003 18:33:20 +0000 (18:33 +0000)
committerDerick Rethans <derick@php.net>
Mon, 26 May 2003 18:33:20 +0000 (18:33 +0000)
  be shown.

NEWS
sapi/cli/php_cli.c

diff --git a/NEWS b/NEWS
index 528869bedf8ec37da7ce08c5ae68d3b61e2b8fce..93013c6893202b52deffedd3b02140e433c29f31 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -32,6 +32,7 @@ PHP 4                                                                      NEWS
 - Added KOI8-R, CP866, and CP1251 support for htmlentities(). 
   (Antony Dovgal, Moriyoshi)
 - Added domdocument->free() to free XML-documents from memory. (Rob Richards)
+- Fixed a bug in error reporting with the CLI for start-up errors. (Derick)
 - Fixed spurious fsync calls during socket communication. (Sascha)
 - Fixed a possible vhost issue in thttpd. (Sascha, dgl@dgl.cx)
 - Fixed including from HTTP URLs. (Sascha)
index 422fe53a6e6a3aa3eaf75a484e5f8012fdf45438..5e5fdfd6cd14754bd921f16caadeeb941afc2e59 100644 (file)
@@ -238,6 +238,13 @@ static char* sapi_cli_read_cookies(TSRMLS_D)
        return NULL;
 }
 
+static int sapi_cli_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
+{
+       /* We do nothing here, this function is needed to prevent that the fallback
+        * header handling is called. */
+       return SAPI_HEADER_SENT_SUCCESSFULLY;
+}
+
 static void sapi_cli_send_header(sapi_header_struct *sapi_header, void *server_context TSRMLS_DC)
 {
        if (sapi_header) {
@@ -301,7 +308,7 @@ static sapi_module_struct cli_sapi_module = {
        php_error,                                              /* error handler */
 
        NULL,                                                   /* header handler */
-       NULL,                                                   /* send headers handler */
+       sapi_cli_send_headers,                  /* send headers handler */
        sapi_cli_send_header,                   /* send header handler */
 
        NULL,                                       /* read POST data */