summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2006-08-08 13:12:00 +0000
committerAntony Dovgal <tony2001@php.net>2006-08-08 13:12:00 +0000
commit03ee80782462851f504d38ae8f683cf4e6bdc6d7 (patch)
tree1c4e71626baddb4fc269b8257c9f6159f54fd844
parent6dbb90af212dc3c7baaae19f624006cc094aaa88 (diff)
downloadphp-git-03ee80782462851f504d38ae8f683cf4e6bdc6d7.tar.gz
zend_hash_get_current_key_ex() returns string_len + 1, so we need to subtract 1 to get the real length
-rw-r--r--ext/standard/info.c4
1 files changed, 2 insertions, 2 deletions
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: