From: Zeev Suraski Date: Wed, 28 Jun 2000 18:27:13 +0000 (+0000) Subject: I'm not sure whether this is necessary or not. Is it guarenteed that get_module_conf() X-Git-Tag: php-4.0.1pl1~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=01a8f4606ea99e9be92dbd4a27c69330786c7a8c;p=php I'm not sure whether this is necessary or not. Is it guarenteed that get_module_conf() will always return a value? Even if there were no relevant directives at all? --- diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c index 514c11e05b..5463b3ade6 100644 --- a/sapi/apache/mod_php4.c +++ b/sapi/apache/mod_php4.c @@ -448,7 +448,9 @@ int send_php(request_rec *r, int display_source_mode, char *filename) return OK; } per_dir_conf = (HashTable *) get_module_config(r->per_dir_config, &php4_module); - zend_hash_apply((HashTable *) per_dir_conf, (int (*)(void *)) php_apache_alter_ini_entries); + if (per_dir_conf) { + zend_hash_apply((HashTable *) per_dir_conf, (int (*)(void *)) php_apache_alter_ini_entries); + } /* We don't accept OPTIONS requests, but take everything else */ if (r->method_number == M_OPTIONS) {