diff options
author | foobar <sniper@php.net> | 2005-07-29 12:58:25 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2005-07-29 12:58:25 +0000 |
commit | a5c41b2c8ed41d00ba265845eb05728c9250b9f7 (patch) | |
tree | 742d1b8612255072788b09fdbccbf83b3e7d6433 /ext/standard/math.c | |
parent | 4b0cdf8cd44e34da89d610e36d836ce238812249 (diff) | |
download | php-git-a5c41b2c8ed41d00ba265845eb05728c9250b9f7.tar.gz |
- Fixed bug #33917 (number_format() output with > 1 char separators)
Diffstat (limited to 'ext/standard/math.c')
-rw-r--r-- | ext/standard/math.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/math.c b/ext/standard/math.c index fdfbeb6d81..2758f8c6e2 100644 --- a/ext/standard/math.c +++ b/ext/standard/math.c @@ -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; |