]> granicus.if.org Git - php/commitdiff
zend_hash_get_current_key_ex() returns string_len + 1, so we need to subtract 1 to...
authorAntony Dovgal <tony2001@php.net>
Tue, 8 Aug 2006 13:12:00 +0000 (13:12 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 8 Aug 2006 13:12:00 +0000 (13:12 +0000)
ext/standard/info.c

index 3f0da75624ca8bf5b8335e6af1ec145e90041b5e..53ae8af21d1c6cb7805564bff7e1ed5598213a38 100644 (file)
@@ -133,9 +133,9 @@ static void php_print_gpcse_array(char *name, uint name_length TSRMLS_DC)
                        switch (zend_hash_get_current_key_ex(Z_ARRVAL_PP(data), &string_key, &string_len, &num_key, 0, NULL)) {
                                case HASH_KEY_IS_STRING:
                                        if (!sapi_module.phpinfo_as_text) {
-                                               php_info_html_esc_write(string_key, string_len TSRMLS_CC);
+                                               php_info_html_esc_write(string_key, string_len - 1 TSRMLS_CC);
                                        } else {
-                                               PHPWRITE(string_key, string_len);
+                                               PHPWRITE(string_key, string_len - 1);
                                        }       
                                        break;
                                case HASH_KEY_IS_LONG: