JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
fixed format_int() to remove leading zeros even when the number is all zeros (eg...
authorJason Woofenden <jason183@herkamire.com>
Thu, 18 Oct 2007 05:43:51 +0000 (01:43 -0400)
committerJason Woofenden <jason183@herkamire.com>
Thu, 18 Oct 2007 05:43:51 +0000 (01:43 -0400)
format.php

index 1586ff0..bb34919 100644 (file)
@@ -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) {