diff --git a/phpseclib/Math/BigInteger.php b/phpseclib/Math/BigInteger.php index 3524668e..c6609e4d 100644 --- a/phpseclib/Math/BigInteger.php +++ b/phpseclib/Math/BigInteger.php @@ -136,7 +136,7 @@ class BigInteger implements \JsonSerializable { if (!isset(self::$mainEngine)) { $engines = [ - ['GMP'], + ['GMP', ['DefaultEngine']], ['PHP64', ['OpenSSL']], ['BCMath', ['OpenSSL']], ['PHP32', ['OpenSSL']], @@ -145,7 +145,7 @@ class BigInteger implements \JsonSerializable ]; foreach ($engines as $engine) { try { - self::setEngine($engine[0], isset($engine[1]) ? $engine[1] : []); + self::setEngine($engine[0], $engine[1]); break; } catch (\Exception $e) { }