diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2006-01-01 20:13:44 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2006-01-01 20:13:44 +0000 |
commit | acdab8fe5e8271d6f709811d91e2bff2e0cc4f7b (patch) | |
tree | 54eff88b46367b2824b200e4b569776fc055051a | |
parent | 82fc47e1f67d045461a84e170b3b4fcb5043afef (diff) | |
download | php-git-acdab8fe5e8271d6f709811d91e2bff2e0cc4f7b.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 20490b986a..1b443bb664 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); } |