Skip to content

Commit 9be1bf4

Browse files
committed
Fixed crash on error message during PHP startup in FastCGI
1 parent fb5c00a commit 9be1bf4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sapi/cgi/cgi_main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,9 @@ static void sapi_cgi_log_message(char *message)
491491

492492
if (!FCGX_IsCGI() && logging) {
493493
FCGX_Request *request = (FCGX_Request *)SG(server_context);
494-
FCGX_FPrintF( request->err, "%s\n", message );
494+
if (request) {
495+
FCGX_FPrintF( request->err, "%s\n", message );
496+
}
495497
/* ignore return code */
496498
} else
497499
#endif /* PHP_FASTCGI */

0 commit comments

Comments
 (0)