tony2001 Tue Oct 4 16:49:36 2005 EDT Modified files: (Branch: PHP_5_0) /php-src NEWS /php-src/ext/standard array.c Log: MFH: fix #34723 (array_count_values() strips leading zeroes) http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.489&r2=1.1760.2.490&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1760.2.489 php-src/NEWS:1.1760.2.490 --- php-src/NEWS:1.1760.2.489 Tue Oct 4 07:19:10 2005 +++ php-src/NEWS Tue Oct 4 16:49:33 2005 @@ -2,6 +2,7 @@ ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 5.0.6 - Renamed CachingRecursiveIterator to RecursiveCachingIterator. (Marcus) +- Fixed bug #34723 (array_count_values() strips leading zeroes). (Tony) - Fixed bug #34678 (__call(), is_callable() and static methods). (Dmitry) - Fixed bug #34643 (wsdl default value has no effect). (Dmitry) - Fixed bug #34617 (zend_deactivate: objects_store used after http://cvs.php.net/diff.php/php-src/ext/standard/array.c?r1=1.266.2.27&r2=1.266.2.28&ty=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.266.2.27 php-src/ext/standard/array.c:1.266.2.28 --- php-src/ext/standard/array.c:1.266.2.27 Mon Oct 3 10:04:41 2005 +++ php-src/ext/standard/array.c Tue Oct 4 16:49:35 2005 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: array.c,v 1.266.2.27 2005/10/03 14:04:41 iliaa Exp $ */ +/* $Id: array.c,v 1.266.2.28 2005/10/04 20:49:35 tony2001 Exp $ */ #include "php.h" #include "php_ini.h" @@ -2491,8 +2491,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;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php