mirror of
https://github.com/php/php-src.git
synced 2025-01-21 03:03:41 +08:00
- Fixed bug #52534 (var_export array with negative key)
This commit is contained in:
parent
5fe988518a
commit
1e17bb2aab
1
NEWS
1
NEWS
@ -1,6 +1,7 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? 2010, PHP 5.3.4
|
||||
- Fixed bug #52534 (var_export array with negative key). (Felipe)
|
||||
- Fixed bug #52508 (newline problem with parse_ini_file+INI_SCANNER_RAW).
|
||||
(Felipe)
|
||||
- Fixed bug #52487 (PDO::FETCH_INTO leaks memory). (Felipe)
|
||||
|
14
ext/standard/tests/array/bug52534.phpt
Normal file
14
ext/standard/tests/array/bug52534.phpt
Normal file
@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
Bug #52534 (var_export array with negative key)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$aArray = array ( -1 => 'Hello');
|
||||
|
||||
var_export($aArray);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array (
|
||||
-1 => 'Hello',
|
||||
)
|
@ -353,7 +353,7 @@ static int php_array_element_export(zval **zv TSRMLS_DC, int num_args, va_list a
|
||||
|
||||
if (hash_key->nKeyLength == 0) { /* numeric key */
|
||||
buffer_append_spaces(buf, level+1);
|
||||
smart_str_append_long(buf, hash_key->h);
|
||||
smart_str_append_long(buf, (long) hash_key->h);
|
||||
smart_str_appendl(buf, " => ", 4);
|
||||
} else { /* string key */
|
||||
char *key, *tmp_str;
|
||||
|
Loading…
Reference in New Issue
Block a user