diff --git a/lib/cast_to_int.php b/lib/cast_to_int.php index fea1612..138a025 100644 --- a/lib/cast_to_int.php +++ b/lib/cast_to_int.php @@ -48,6 +48,8 @@ function RandomCompat_intval($number, $fail_open = false) { if (is_int($number) || is_float($number)) { $number += 0; + } elseif (is_numeric($number)) { + $number = (int) $number; } if (