From f7a545b5bf570b443f6e7b3d008e0047ab47e399 Mon Sep 17 00:00:00 2001 From: foobar Date: Fri, 29 Jul 2005 12:59:38 +0000 Subject: [PATCH] MFH --- ext/standard/math.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/standard/math.c b/ext/standard/math.c index e29b5f48fc..6891016430 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; -- 2.40.0