From: Antony Dovgal Date: Tue, 8 Aug 2006 13:12:00 +0000 (+0000) Subject: zend_hash_get_current_key_ex() returns string_len + 1, so we need to subtract 1 to... X-Git-Tag: php-5.2.0RC2~69 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=03ee80782462851f504d38ae8f683cf4e6bdc6d7;p=php zend_hash_get_current_key_ex() returns string_len + 1, so we need to subtract 1 to get the real length --- diff --git a/ext/standard/info.c b/ext/standard/info.c index 3f0da75624..53ae8af21d 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -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: