From: Ilia Alshanetsky Date: Wed, 6 Oct 2004 00:12:04 +0000 (+0000) Subject: Possible fix for bug #29764 X-Git-Tag: php-5.0.3RC1~171 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2daa88cd487f522e1572f3e2153f52497ba1c04a;p=php Possible fix for bug #29764 --- diff --git a/sapi/apache/php_apache.c b/sapi/apache/php_apache.c index a52e95d19b..6aa96407a2 100644 --- a/sapi/apache/php_apache.c +++ b/sapi/apache/php_apache.c @@ -524,9 +524,17 @@ PHP_FUNCTION(apache_get_modules) char *p; array_init(return_value); + + if (!ap_loaded_modules) { + return; + } for (n = 0; ap_loaded_modules[n]; ++n) { char *s = (char *) ap_loaded_modules[n]->name; + if (!s) { + continue; + } + if ((p = strchr(s, '.'))) { add_next_index_stringl(return_value, s, (p - s), 1); } else {