]> granicus.if.org Git - php/commitdiff
I'm not sure whether this is necessary or not. Is it guarenteed that get_module_conf()
authorZeev Suraski <zeev@php.net>
Wed, 28 Jun 2000 18:27:13 +0000 (18:27 +0000)
committerZeev Suraski <zeev@php.net>
Wed, 28 Jun 2000 18:27:13 +0000 (18:27 +0000)
will always return a value?  Even if there were no relevant directives at all?

sapi/apache/mod_php4.c

index 514c11e05b0a6f827f8293ecfde78c453fd2840a..5463b3ade62084ee276838d51fc532aea6741c53 100644 (file)
@@ -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) {