tony2001 Tue Oct 4 16:48:23 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/standard array.c /php-src NEWS Log: MFH: fix #34723 (array_count_values() strips leading zeroes) http://cvs.php.net/diff.php/php-src/ext/standard/array.c?r1=1.308.2.5&r2=1.308.2.6&ty=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.308.2.5 php-src/ext/standard/array.c:1.308.2.6 --- php-src/ext/standard/array.c:1.308.2.5 Mon Oct 3 10:04:16 2005 +++ php-src/ext/standard/array.c Tue Oct 4 16:48:17 2005 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: array.c,v 1.308.2.5 2005/10/03 14:04:16 iliaa Exp $ */ +/* $Id: array.c,v 1.308.2.6 2005/10/04 20:48:17 tony2001 Exp $ */ #include "php.h" #include "php_ini.h" @@ -2520,8 +2520,9 @@ Z_LVAL_PP(tmp)++; } } else if (Z_TYPE_PP(entry) == IS_STRING) { - /* make sure our array does not end up with numeric string keys */ - if (is_numeric_string(Z_STRVAL_PP(entry), Z_STRLEN_PP(entry), NULL, NULL, 0) == IS_LONG) { + /* make sure our array does not end up with numeric string keys + * but don't touch those strings that start with 0 */ + if (!(Z_STRLEN_PP(entry) > 1 && Z_STRVAL_PP(entry)[0] == '0') && is_numeric_string(Z_STRVAL_PP(entry), Z_STRLEN_PP(entry), NULL, NULL, 0) == IS_LONG) { zval tmp_entry; tmp_entry = **entry; http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.91&r2=1.2027.2.92&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.91 php-src/NEWS:1.2027.2.92 --- php-src/NEWS:1.2027.2.91 Tue Oct 4 07:18:01 2005 +++ php-src/NEWS Tue Oct 4 16:48:17 2005 @@ -40,6 +40,7 @@ - Fixed "make test" to work for phpized extensions. (Hartmut, Jani) - Fixed failing queries (FALSE returned) with mysqli_query() on 64 bit systems. (Andrey) +- Fixed bug #34723 (array_count_values() strips leading zeroes). (Tony) - Fixed bug #34678 (__call(), is_callable() and static methods). (Dmitry) - Fixed bug #34645 (ctype corrupts memory when validating large numbers). (Ilia) - Fixed bug #34643 (wsdl default value has no effect). (Dmitry)
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php