iliaa Fri Dec 22 04:03:15 2006 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/strings bug39873.phpt
Modified files: /php-src NEWS /php-src/ext/standard math.c Log: Fixed bug #39873 (number_format() breaks with locale & decimal points). http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.450&r2=1.2027.2.547.2.451&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.450 php-src/NEWS:1.2027.2.547.2.451 --- php-src/NEWS:1.2027.2.547.2.450 Thu Dec 21 09:12:42 2006 +++ php-src/NEWS Fri Dec 22 04:03:14 2006 @@ -19,6 +19,8 @@ - Fixed bug #39903 (Notice message when executing __halt_compiler() more than once). (Tony) - Fixed bug #39898 (FILTER_VALIDATE_URL validates \r\n\t etc). (Ilia) +- Fixed bug #39873 (number_format() breaks with locale & decimal points). + (Ilia) - Fixed bug #39869 (safe_read does not initialize errno). (michiel at boland dot org, Dmitry) - Fixed bug #39850 (SplFileObject throws contradictory/wrong error messages http://cvs.php.net/viewvc.cgi/php-src/ext/standard/math.c?r1=1.131.2.2.2.2&r2=1.131.2.2.2.3&diff_format=u Index: php-src/ext/standard/math.c diff -u php-src/ext/standard/math.c:1.131.2.2.2.2 php-src/ext/standard/math.c:1.131.2.2.2.3 --- php-src/ext/standard/math.c:1.131.2.2.2.2 Sun Aug 27 19:14:43 2006 +++ php-src/ext/standard/math.c Fri Dec 22 04:03:15 2006 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: math.c,v 1.131.2.2.2.2 2006/08/27 19:14:43 bjori Exp $ */ +/* $Id: math.c,v 1.131.2.2.2.3 2006/12/22 04:03:15 iliaa Exp $ */ #include "php.h" #include "php_math.h" @@ -983,7 +983,11 @@ } /* find decimal point, if expected */ - dp = dec ? strchr(tmpbuf, '.') : NULL; + if (dec) { + dp = strpbrk(tmpbuf, ".,"); + } else { + dp = NULL; + } /* calculate the length of the return buffer */ if (dp) { http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/bug39873.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/strings/bug39873.phpt +++ php-src/ext/standard/tests/strings/bug39873.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php