summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2005-07-29 13:00:11 +0000
committerfoobar <sniper@php.net>2005-07-29 13:00:11 +0000
commitc82f578f82882ffe8694b0846ee8632a15949d60 (patch)
tree498754f9a115a2b4ba72b3414f246c2ff3b4c077
parent9555ebfabb945b5258d84061ce54fb830f1c9698 (diff)
downloadphp-git-c82f578f82882ffe8694b0846ee8632a15949d60.tar.gz
MFH
-rw-r--r--ext/standard/math.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/math.c b/ext/standard/math.c
index 8278f1a277..a851da409b 100644
--- a/ext/standard/math.c
+++ b/ext/standard/math.c
@@ -1139,7 +1139,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;
@@ -1147,7 +1147,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;