dmitry          Wed Feb 22 15:09:44 2006 UTC

  Modified files:              (Branch: PHP_5_0)
    /php-src/sapi/cgi   cgi_main.c 
  Log:
  Fixed crash on error message during PHP startup in FastCGI
  
  
http://cvs.php.net/viewcvs.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.256.2.8&r2=1.256.2.9&diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.256.2.8 
php-src/sapi/cgi/cgi_main.c:1.256.2.9
--- php-src/sapi/cgi/cgi_main.c:1.256.2.8       Fri Dec  9 17:02:13 2005
+++ php-src/sapi/cgi/cgi_main.c Wed Feb 22 15:09:44 2006
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: cgi_main.c,v 1.256.2.8 2005/12/09 17:02:13 dmitry Exp $ */
+/* $Id: cgi_main.c,v 1.256.2.9 2006/02/22 15:09:44 dmitry Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -491,7 +491,9 @@
                                                                                
                         
        if (!FCGX_IsCGI() && logging) {
                FCGX_Request *request = (FCGX_Request *)SG(server_context);
-               FCGX_FPrintF( request->err, "%s\n", message );
+               if (request) {
+                       FCGX_FPrintF( request->err, "%s\n", message );
+               }
                /* ignore return code */
        } else
 #endif /* PHP_FASTCGI */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to