Skip to content

Commit

Permalink
avoid using bcmod
Browse files Browse the repository at this point in the history
  • Loading branch information
ceeram authored and predominant committed Dec 19, 2009
1 parent 21c5db9 commit e80a987
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libs/fr_validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ function ssn($check) {
$numberWithoutKey -= 2000000;
}

// bcmod works with large numbers where % doesn't
$expectedKey = 97 - bcmod($numberWithoutKey, 97);
$expectedKey = (97-($numberWithoutKey-(floor($numberWithoutKey/97)*97)));

return ($expectedKey == $key);
}
Expand Down

0 comments on commit e80a987

Please sign in to comment.