derick Wed Jan 7 14:36:50 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/general_functions bug47027.phpt
Modified files: /php-src/ext/standard var.c /php-src NEWS Log: - MFH: Fixed bug #47027 (var_export doesn't show numeric indices on ArrayObject). http://cvs.php.net/viewvc.cgi/php-src/ext/standard/var.c?r1=1.203.2.7.2.24&r2=1.203.2.7.2.25&diff_format=u Index: php-src/ext/standard/var.c diff -u php-src/ext/standard/var.c:1.203.2.7.2.24 php-src/ext/standard/var.c:1.203.2.7.2.25 --- php-src/ext/standard/var.c:1.203.2.7.2.24 Wed Dec 31 11:17:46 2008 +++ php-src/ext/standard/var.c Wed Jan 7 14:36:49 2009 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: var.c,v 1.203.2.7.2.24 2008/12/31 11:17:46 sebastian Exp $ */ +/* $Id: var.c,v 1.203.2.7.2.25 2009/01/07 14:36:49 derick Exp $ */ @@ -378,13 +378,15 @@ level = va_arg(args, int); + php_printf("%*c", level + 1, ' '); if (hash_key->nKeyLength != 0) { - php_printf("%*c", level + 1, ' '); - zend_unmangle_property_name(hash_key->arKey, hash_key->nKeyLength-1, &class_name, &prop_name); + zend_unmangle_property_name(hash_key->arKey, hash_key->nKeyLength - 1, &class_name, &prop_name); php_printf(" '%s' => ", prop_name); - php_var_export(zv, level + 2 TSRMLS_CC); - PUTS (",\n"); + } else { + php_printf(" %ld => ", hash_key->h); } + php_var_export(zv, level + 2 TSRMLS_CC); + PUTS (",\n"); return 0; } http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1378&r2=1.2027.2.547.2.1379&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1378 php-src/NEWS:1.2027.2.547.2.1379 --- php-src/NEWS:1.2027.2.547.2.1378 Tue Jan 6 01:33:16 2009 +++ php-src/NEWS Wed Jan 7 14:36:49 2009 @@ -11,6 +11,8 @@ (Fixes CVE-2008-5498) (Scott) - Fixed a segfault when malformed string is passed to json_decode(). (Scott) +- Fixed bug #47027 (var_export doesn't show numeric indices on ArrayObject). + (Derick) - Fixed bug #46985 (OVERWRITE and binary mode does not work, regression introduced in 5.2.8). (Pierre) - Fixed bug #46973 (IPv6 address filter rejects valid address). (Felipe) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/bug47027.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/general_functions/bug47027.phpt +++ php-src/ext/standard/tests/general_functions/bug47027.phpt --TEST-- Bug #47027 (var_export doesn't show numeric indices on ArrayObject) --FILE-- <?php $ao = new ArrayObject(array (2 => "foo", "bar" => "baz")); var_export ($ao); ?> --EXPECT-- ArrayObject::__set_state(array( 2 => 'foo', 'bar' => 'baz', )) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php