1
0
mirror of https://github.com/danog/math.git synced 2025-01-22 21:51:22 +01:00

Fix parse() method on latest PHP 7

The behaviour of substr() has been changed following the fix of this bug:
https://bugs.php.net/bug.php?id=62922

By this commit:
257054e81d
This commit is contained in:
Benjamin Morel 2015-06-21 14:14:34 +02:00
parent 3afa5cef7b
commit 3fd07960ef

View File

@ -100,7 +100,7 @@ class BigInteger extends BigNumber implements \Serializable
$sign = ''; $sign = '';
} }
if ($number === false) { if ($number === false /* PHP 5 */ || $number === '' /* PHP 7 */) {
throw new \InvalidArgumentException('The value cannot be empty.'); throw new \InvalidArgumentException('The value cannot be empty.');
} }