From: Dmitry Stogov Date: Wed, 22 Feb 2006 15:11:53 +0000 (+0000) Subject: Fixed crash on error message during PHP startup in FastCGI X-Git-Tag: php-4.4.3RC1~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=134f474e5f235b612a94f1ee56a8b5b3ffaac492;p=php Fixed crash on error message during PHP startup in FastCGI --- diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 5efda508ea..248b9ef37d 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -483,7 +483,9 @@ static void sapi_cgi_log_message(char *message) 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 */