diff options
author | Paragon Initiative Enterprises <security@paragonie.com> | 2017-03-03 15:35:22 -0500 |
---|---|---|
committer | Paragon Initiative Enterprises <security@paragonie.com> | 2017-03-03 15:35:22 -0500 |
commit | ae8d9579494c22cb0fecb7f8c3e2a43724220810 (patch) | |
tree | 0b8cd7bd57386457039799bc557c8cc0e95a4690 | |
parent | 748221e7a0c62e8b5613e4ec7571e245cb539c55 (diff) | |
download | random_compat-ae8d9579494c22cb0fecb7f8c3e2a43724220810.zip random_compat-ae8d9579494c22cb0fecb7f8c3e2a43724220810.tar.gz random_compat-ae8d9579494c22cb0fecb7f8c3e2a43724220810.tar.bz2 |
Make psalm happy without breaking BC.
-rw-r--r-- | lib/cast_to_int.php | 2 |
1 files changed, 2 insertions, 0 deletions
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 @@ if (!is_callable('RandomCompat_intval')) { { if (is_int($number) || is_float($number)) { $number += 0; + } elseif (is_numeric($number)) { + $number = (int) $number; } if ( |