cvs: php4(PHP_4_2_0) /sapi/apache2filter sapi_apache2.c
| From: | Aaron Bannert | Date: | Thu, 18 Apr 2002 16:25:51 +0000 |
| Subject: | cvs: php4(PHP_4_2_0) /sapi/apache2filter sapi_apache2.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-11196@lists.php.net to get a copy of this message | ||
aaron Thu Apr 18 12:25:51 2002 EDT
Modified files: (Branch: PHP_4_2_0)
/php4/sapi/apache2filter sapi_apache2.c
Log:
It makes more sense to do the null-pointer check *before* trying to use it.
(Also fix a typo that Cliff pointed out: "safe" --> "save".)
Obtained from: Ryan Morgan <rmorgan@covalent.net>
Index: php4/sapi/apache2filter/sapi_apache2.c
diff -u php4/sapi/apache2filter/sapi_apache2.c:1.61.2.9
php4/sapi/apache2filter/sapi_apache2.c:1.61.2.10
--- php4/sapi/apache2filter/sapi_apache2.c:1.61.2.9 Fri Apr 12 18:26:28 2002
+++ php4/sapi/apache2filter/sapi_apache2.c Thu Apr 18 12:25:50 2002
@@ -346,12 +346,12 @@
ap_add_cgi_vars(f->r);
ctx = SG(server_context);
- ctx->f = f; /* safe whatever filters are after us in the chain. */
if (ctx == NULL) {
ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, f->r,
"php failed to get server context");
return HTTP_INTERNAL_SERVER_ERROR;
}
+ ctx->f = f; /* save whatever filters are after us in the chain. */
if (ctx->request_processed) {
return ap_pass_brigade(f->next, bb);