Fixed check for empty POST in check_num()
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Sun, 10 Jan 2010 21:38:14 +0000 (21:38 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Sun, 10 Jan 2010 21:38:14 +0000 (21:38 +0000)
includes/data_checks.inc

index 295a353e1203d2ec1cc484291803d9e8113f7fe7..9589f13c9e60d181db3d8b3abef14017c0690969 100644 (file)
@@ -475,7 +475,7 @@ function check_num($postname, $min=null, $max=null) {
        if(!isset($_POST[$postname]))
          return 0;
     $num = input_num($postname);
-    if ($num === false) 
+    if ($num === false || $num === null
          return 0;
     if (isset($min) && ($num<$min)) 
          return 0;