summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2006-01-01 20:13:31 +0000
committerIlia Alshanetsky <iliaa@php.net>2006-01-01 20:13:31 +0000
commit14b8cbedb75abb17024e38fac0f21a3b2b7a8359 (patch)
tree1bb4441a6df87fff23954eedfb4a04497337f0d0
parent7b8104bcf6310d3bb7f809ffa4af840ad3d1ca08 (diff)
downloadphp-git-14b8cbedb75abb17024e38fac0f21a3b2b7a8359.tar.gz
MFB51: Added safety checks
-rw-r--r--sapi/apache2handler/php_functions.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c
index 557a109964..f6a0cab4d3 100644
--- a/sapi/apache2handler/php_functions.c
+++ b/sapi/apache2handler/php_functions.c
@@ -58,13 +58,11 @@ php_apache2_info_struct php_apache2_info;
static request_rec *php_apache_lookup_uri(char *filename TSRMLS_DC)
{
- php_struct *ctx;
+ php_struct *ctx = SG(server_context);
- if (!filename) {
+ if (!filename || !ctx || !ctx->r) {
return NULL;
}
-
- ctx = SG(server_context);
return ap_sub_req_lookup_uri(filename, ctx->r, ctx->r->output_filters);
}