mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
MFB51: Added safety checks
This commit is contained in:
parent
7b8104bcf6
commit
14b8cbedb7
1 changed files with 2 additions and 4 deletions
|
@ -58,13 +58,11 @@ php_apache2_info_struct php_apache2_info;
|
||||||
|
|
||||||
static request_rec *php_apache_lookup_uri(char *filename TSRMLS_DC)
|
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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx = SG(server_context);
|
|
||||||
|
|
||||||
return ap_sub_req_lookup_uri(filename, ctx->r, ctx->r->output_filters);
|
return ap_sub_req_lookup_uri(filename, ctx->r, ctx->r->output_filters);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue