]> granicus.if.org Git - php/commitdiff
- Fixed bug #33917 (number_format() output with > 1 char separators)
authorfoobar <sniper@php.net>
Fri, 29 Jul 2005 12:58:25 +0000 (12:58 +0000)
committerfoobar <sniper@php.net>
Fri, 29 Jul 2005 12:58:25 +0000 (12:58 +0000)
NEWS
ext/standard/math.c

diff --git a/NEWS b/NEWS
index 8a9198f880d2001e9e65301e8f5518223bfbc564..68e2086f8d2da346b29154a8ce69c02cd6baf6c9 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
 PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 2005, PHP 5.1
+- Fixed bug #33917 (number_format() output with > 1 char separators). (Jani)
 - Fixed bug #33882 (CLI was looking for php.ini in wrong path). (Hartmut)
 - Fixed bug #33869 (strtotime() problem with "+1days" format). (Ilia) 
 - Fixed bug #33841 (pdo sqlite driver forgets to update affected column count
index fdfbeb6d812e536047f2887fb1e5e51034d5524e..2758f8c6e21be36f74d6e748d2a8bafaf03a9772 100644 (file)
@@ -1099,7 +1099,7 @@ PHP_FUNCTION(number_format)
 
                if (Z_TYPE_PP(d_p) != IS_NULL) { 
                        convert_to_string_ex(d_p);
-                       if (Z_STRLEN_PP(d_p)==1) {
+                       if (Z_STRLEN_PP(d_p)>=1) {
                                dec_point=Z_STRVAL_PP(d_p)[0];
                        } else if (Z_STRLEN_PP(d_p)==0) {
                                dec_point=0;
@@ -1107,7 +1107,7 @@ PHP_FUNCTION(number_format)
                }
                if (Z_TYPE_PP(t_s) != IS_NULL) {
                        convert_to_string_ex(t_s);
-                       if (Z_STRLEN_PP(t_s)==1) {
+                       if (Z_STRLEN_PP(t_s)>=1) {
                                thousand_sep=Z_STRVAL_PP(t_s)[0];
                        } else if(Z_STRLEN_PP(t_s)==0) {
                                thousand_sep=0;