Re: PHP 4.2.0 RC4

From: Date: Tue, 16 Apr 2002 22:56:52 +0000
Subject: Re: PHP 4.2.0 RC4
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-82869@lists.php.net to get a copy of this message
On Tue, Apr 16, 2002 at 10:56:08AM +0200, Balazs Nagy wrote: > Excusez moi, I had a hard time in the last D&D3 session when I wrote > this. Here's the dump: Give the attached patch a try. Looks like we're just trying to use the server_context before it's been initialized. (Thanks for Cliff for pointing this message out to me.) -aaron Index: sapi_apache2.c =================================================================== RCS file: /repository/php4/sapi/apache2filter/sapi_apache2.c,v retrieving revision 1.61.2.9 diff -u -u -r1.61.2.9 sapi_apache2.c --- sapi_apache2.c 12 Apr 2002 22:26:28 -0000 1.61.2.9 +++ sapi_apache2.c 16 Apr 2002 22:49:53 -0000 @@ -211,7 +211,14 @@ * line. Not sure if this is correct, but it mirrors what happens * with Apache 1.3 -- rbb */ - ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO | APLOG_STARTUP, 0, ctx->r->server, "%s", msg); + if (ctx == NULL) { /* we haven't initialized our ctx yet, oh well */ + ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO | APLOG_STARTUP, + 0, NULL, "%s", msg); + } + else { + ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO | APLOG_STARTUP, + 0, ctx->r->server, "%s", msg); + } } static sapi_module_struct apache2_sapi_module = {

« previous php.dev (#82869) next »