Skip to content

Commit

Permalink
Make psalm happy without breaking BC.
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-security committed Mar 3, 2017
1 parent 748221e commit ae8d957
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/cast_to_int.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit ae8d957

Please sign in to comment.