summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Bannert <aaron@php.net>2002-04-16 17:41:28 +0000
committerAaron Bannert <aaron@php.net>2002-04-16 17:41:28 +0000
commit2e3ce44c805f98fe8ff8cce6916bff75e8958d0b (patch)
tree1edaf118f6ccdd6514e18a6011487ac7d364e438
parent651c00718a18cac14d8a68f92aa23179a2417bc9 (diff)
downloadphp-git-2e3ce44c805f98fe8ff8cce6916bff75e8958d0b.tar.gz
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>
-rw-r--r--sapi/apache2filter/sapi_apache2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c
index 7c51ed10e2..e84fd3ede4 100644
--- a/sapi/apache2filter/sapi_apache2.c
+++ b/sapi/apache2filter/sapi_apache2.c
@@ -346,12 +346,12 @@ static int php_output_filter(ap_filter_t *f, apr_bucket_brigade *bb)
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);