summaryrefslogtreecommitdiff
path: root/sapi/apache/mod_php4.c
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/apache/mod_php4.c')
-rw-r--r--sapi/apache/mod_php4.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c
index 53ddb92d87..a58df34143 100644
--- a/sapi/apache/mod_php4.c
+++ b/sapi/apache/mod_php4.c
@@ -312,9 +312,11 @@ static void php_apache_request_shutdown(void *dummy)
SLS_FETCH();
APLS_FETCH();
- AP(in_request)=0;
SG(server_context) = NULL; /* The server context (request) is invalid by the time run_cleanups() is called */
- php_request_shutdown(dummy);
+ if (AP(in_request)) {
+ AP(in_request) = 0;
+ php_request_shutdown(dummy);
+ }
}
/* }}} */