From 37b043afb549436e990d641362dcd50fa2033b81 Mon Sep 17 00:00:00 2001 From: sparkyx Date: Thu, 1 Apr 2004 01:28:03 +0000 Subject: [PATCH] Improve isNumber --- include/ac_common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ac_common.php b/include/ac_common.php index 88a286f6d..ea2b6d28f 100644 --- a/include/ac_common.php +++ b/include/ac_common.php @@ -72,7 +72,7 @@ function cmpDate ($p_date,$p_date_oth) { */ function isNumber($p_int) { if ( strlen (trim($p_int)) == 0 ) return 0; - if (! ereg ("^[0-9]+$",$p_int) ) { + if (! ereg ("^-{0,1}[0-9]+.{0,1}[0-9]*$",$p_int) ) { return 0; } else { return 1;