BigInteger: new BigInteger('00') caused issues with GMP

This commit is contained in:
terrafrost 2019-05-26 11:41:03 -05:00
parent e9d99a6683
commit 9c67616f1e

View File

@ -441,6 +441,9 @@ class Math_BigInteger
// (?<=^|-)0*: find any 0's that are preceded by the start of the string or by a - (ie. octals)
// [^-0-9].*: find any non-numeric characters and then any characters that follow that
$x = preg_replace('#(?<!^)(?:-).*|(?<=^|-)0*|[^-0-9].*#', '', $x);
if (!strlen($x)) {
$x = '0';
}
switch (MATH_BIGINTEGER_MODE) {
case MATH_BIGINTEGER_MODE_GMP: