Changeset 1607090
- Timestamp:
- 03/03/2017 10:45:00 AM (9 years ago)
- Location:
- wtools/trunk
- Files:
-
- 3 edited
-
includes/form-sanitization.php (modified) (1 diff)
-
includes/form.php (modified) (1 diff)
-
wtools.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wtools/trunk/includes/form-sanitization.php
r1606332 r1607090 31 31 function wtools_form_sanitize_field_type_value_int($str) { 32 32 $return = filter_var($str, FILTER_SANITIZE_NUMBER_INT); 33 return $return === FALSE ? NULL : $return;33 return $return === FALSE ? NULL : (int) $return; 34 34 } 35 35 36 36 function wtools_form_sanitize_field_type_value_float($str) { 37 37 $return = filter_var($str, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); 38 return $return === FALSE ? NULL : $return;38 return $return === FALSE ? NULL : (float) $return; 39 39 } -
wtools/trunk/includes/form.php
r1606332 r1607090 188 188 } 189 189 $value = static::arrayGetNestedValue($this->values, $field); 190 if (empty($value) ) {190 if (empty($value) && !is_numeric($value)) { 191 191 $this->setError($field, sprintf(_("'%s' is required."), $label)); 192 192 } -
wtools/trunk/wtools.php
r1606345 r1607090 8 8 Plugin URI: https://wordpress.org/plugins/wtools/ 9 9 Description: WTools brings various functions and classes to make developing other plugins faster. 10 Version: 0. 610 Version: 0.7 11 11 Author: Junaid 12 12 License: GPLv2 or later
Note: See TracChangeset
for help on using the changeset viewer.