diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2004-10-06 00:12:04 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2004-10-06 00:12:04 +0000 |
commit | 2daa88cd487f522e1572f3e2153f52497ba1c04a (patch) | |
tree | 2320ca43ba483b8933ef6dcf4200835b81aa2233 | |
parent | 32617aea68628d3b7f92043190da6989634ea7ac (diff) | |
download | php-git-2daa88cd487f522e1572f3e2153f52497ba1c04a.tar.gz |
Possible fix for bug #29764
-rw-r--r-- | sapi/apache/php_apache.c | 8 |
1 files changed, 8 insertions, 0 deletions
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 { |