From a2093c37f91d34a3798c7a8f23f6c53baea8beb0 Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Thu, 18 Oct 2007 01:43:51 -0400 Subject: [PATCH] fixed format_int() to remove leading zeros even when the number is all zeros (eg 00, 000, 0000, etc.) --- format.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/format.php b/format.php index 1586ff0..bb34919 100644 --- a/format.php +++ b/format.php @@ -42,7 +42,7 @@ function format_options($str, $name) { function format_int($str) { $str = ereg_replace('[^0-9]', '', $str); - return ereg_replace('^0*([1-9])', '\1', $str); + return ereg_replace('^0*([0-9])', '\1', $str); } function format_decimal($str) { -- 1.7.10.4