]> granicus.if.org Git - php/commitdiff
Fixed win32 build (bug #21506).
authorIlia Alshanetsky <iliaa@php.net>
Tue, 28 Jan 2003 01:25:34 +0000 (01:25 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 28 Jan 2003 01:25:34 +0000 (01:25 +0000)
Fixed a bug that would cause garbage data to appear at the end of the
loaded apache modules list in phpinfo().

sapi/apache2filter/php_functions.c

index ae29e6e030f96b1c1b3156a3b57f5948ccf726b5..34f85b881284fc474d4a98c63112ff7cb1d5ab88 100644 (file)
@@ -40,8 +40,6 @@
 
 #include "php_apache.h"
 
-extern module **ap_loaded_modules;
-
 static request_rec *php_apache_lookup_uri(char *filename TSRMLS_DC)
 {
        php_struct *ctx;
@@ -342,6 +340,9 @@ PHP_MINFO_FUNCTION(apache)
                }
                smart_str_appendc(&tmp1, ' ');
        }
+       if ((tmp1.len - 1) >= 0) {
+               tmp1.c[tmp1.len - 1] = '\0';
+       }
             
        php_info_print_table_start();
        if (apv && *apv) {