Changeset 2831460
- Timestamp:
- 12/10/2022 07:15:35 AM (3 years ago)
- File:
-
- 1 edited
-
kofc-state/trunk/helpers/validation_helper.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
kofc-state/trunk/helpers/validation_helper.php
r2831418 r2831460 32 32 */ 33 33 function otgkofcs_get_request_int ($field, $default=null) { 34 if (empty($_REQUEST[$field]) || (!ctype_digit(trim($_REQUEST[$field])) && !is_int(trim($_REQUEST[$field])))) { 35 if (is_int($default) || ctype_digit($default)) 34 $value = trim($_REQUEST[$field]); 35 if (!is_numeric($value) && !is_int($value)) { 36 if (is_int($default) || is_numeric($default)) 36 37 $out = $default; 37 38 else 38 39 $out = null; 39 40 } else { 40 $out = (int) trim($_REQUEST[$field]);41 $out = (int)$value; 41 42 } 42 43 return $out;
Note: See TracChangeset
for help on using the changeset viewer.