From ae8d9579494c22cb0fecb7f8c3e2a43724220810 Mon Sep 17 00:00:00 2001 From: Paragon Initiative Enterprises Date: Fri, 3 Mar 2017 15:35:22 -0500 Subject: [PATCH] Make psalm happy without breaking BC. --- lib/cast_to_int.php | 2 ++ 1 file changed, 2 insertions(+) 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 (