diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2006-01-01 20:14:06 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2006-01-01 20:14:06 +0000 |
commit | 4f004c35665f987505ec28c4cd64b04904fde9b2 (patch) | |
tree | 94b00e90cfa17f9cd71edf7cb7fe7460ca609a95 | |
parent | 915bc619ef86abd3754e6e9c99787e71bd420302 (diff) | |
download | php-git-4f004c35665f987505ec28c4cd64b04904fde9b2.tar.gz |
MFH: Added safety checks
-rw-r--r-- | sapi/apache2handler/php_functions.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c index 595d2c03fe..fa99082489 100644 --- a/sapi/apache2handler/php_functions.c +++ b/sapi/apache2handler/php_functions.c @@ -56,13 +56,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); } |