diff options
author | Uwe Schindler <thetaphi@php.net> | 2007-04-27 00:29:26 +0000 |
---|---|---|
committer | Uwe Schindler <thetaphi@php.net> | 2007-04-27 00:29:26 +0000 |
commit | 88bef568da7180b0a5303a814f02f5549c27620e (patch) | |
tree | 8e6c6e3f804e953e34bd47a6db63d32ecd4f9faa /sapi/nsapi/nsapi.c | |
parent | 66859a74deae600a355d43afb0876cf189877396 (diff) | |
download | php-git-88bef568da7180b0a5303a814f02f5549c27620e.tar.gz |
MFH: Fix crash on server startup when log message is printed
Diffstat (limited to 'sapi/nsapi/nsapi.c')
-rw-r--r-- | sapi/nsapi/nsapi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sapi/nsapi/nsapi.c b/sapi/nsapi/nsapi.c index fcd38f023e..dac56dd711 100644 --- a/sapi/nsapi/nsapi.c +++ b/sapi/nsapi/nsapi.c @@ -709,7 +709,11 @@ static void nsapi_log_message(char *message) TSRMLS_FETCH(); nsapi_request_context *rc = (nsapi_request_context *)SG(server_context); - log_error(LOG_INFORM, pblock_findval("fn", rc->pb), rc->sn, rc->rq, "%s", message); + if (rc) { + log_error(LOG_INFORM, pblock_findval("fn", rc->pb), rc->sn, rc->rq, "%s", message); + } else { + log_error(LOG_INFORM, "php5", NULL, NULL, "%s", message); + } } static time_t sapi_nsapi_get_request_time(TSRMLS_D) |