From 815aa23b39993f81a687b245f70e1f60e25ca5b5 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Thu, 10 Mar 2022 05:24:30 -0600 Subject: [PATCH] BigInteger/Engines/BCMath: bcmod got a third param in PHP 7.2.0 the third parameter also isn't set in any other bcmod call and isn't needed for bccomp anyway as bccomp('0.000', '0') == bccomp('0', '0') --- phpseclib/Math/BigInteger/Engines/BCMath.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpseclib/Math/BigInteger/Engines/BCMath.php b/phpseclib/Math/BigInteger/Engines/BCMath.php index cc3ff79e..db30a87f 100644 --- a/phpseclib/Math/BigInteger/Engines/BCMath.php +++ b/phpseclib/Math/BigInteger/Engines/BCMath.php @@ -663,7 +663,7 @@ class BCMath extends Engine public function testBit($x) { return bccomp( - bcmod($this->value, bcpow('2', $x + 1, 0), 0), + bcmod($this->value, bcpow('2', $x + 1, 0)), bcpow('2', $x, 0), 0 ) >= 0;