Changeset 2831451
- Timestamp:
- 12/10/2022 06:12:47 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
business-listing/trunk/helpers/validation_helper.php
r2831421 r2831451 32 32 */ 33 33 function otgblist_get_request_int ($field, $default=null) { 34 if (empty($_REQUEST[$field]) || (!ctype_digit(trim($_REQUEST[$field])) && !is_int(trim($_REQUEST[$field])))) { 34 $value = trim($_REQUEST[$field]); 35 if (!ctype_digit($value) && !is_int($value)) { 35 36 if (is_int($default) || ctype_digit($default)) 36 37 $out = $default; … … 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.