Skip to content

Commit

Permalink
Fix BigInteger::parse() not throwing exception on PHP 7
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Mar 31, 2016
1 parent 4f4b953 commit e04b04d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/BigInteger.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public static function parse($number, $base = 10)
$sign = '';
}

if ($number === false) {
if ($number === false /* PHP 5 */ || $number === '' /* PHP 7 */) {
throw new \InvalidArgumentException('The value cannot be empty.');
}

Expand Down

0 comments on commit e04b04d

Please sign in to comment.