]> granicus.if.org Git - php/commitdiff
MFH(r-1.174): Better fix for bug #25758
authorMoriyoshi Koizumi <moriyoshi@php.net>
Wed, 8 Oct 2003 01:52:07 +0000 (01:52 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Wed, 8 Oct 2003 01:52:07 +0000 (01:52 +0000)
ext/standard/var.c

index d324da74a6e43b22d086ea7ed41bc333ab4971ca..c29364209c929039012e7a24d2667f4b5ea3ee03 100644 (file)
@@ -258,7 +258,7 @@ static int php_array_element_export(zval **zv, int num_args, va_list args, zend_
        } else { /* string key */
                char *key;
                int key_len;
-               key = php_addcslashes(hash_key->arKey, strlen(hash_key->arKey), &key_len, 0, "'\\", 2 TSRMLS_CC);
+               key = php_addcslashes(hash_key->arKey, hash_key->nKeyLength - 1, &key_len, 0, "'\\", 2 TSRMLS_CC);
                php_printf("%*c'%s' => ", level + 1, ' ', key);
                efree(key);
        }