From ad03d8446190a4c34034be50605e7ea829928ffe Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 17 Oct 2014 18:03:02 +0200 Subject: [PATCH] Restore compatibility with PHP 5.6.1 by using explicit array indexes. This seems to be caused by the resolution of PHP Ticket 67985. --- phpseclib/Math/BigInteger.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpseclib/Math/BigInteger.php b/phpseclib/Math/BigInteger.php index ec229596..109d346e 100644 --- a/phpseclib/Math/BigInteger.php +++ b/phpseclib/Math/BigInteger.php @@ -915,7 +915,7 @@ class Math_BigInteger $value = $x_value; } - $value[] = 0; // just in case the carry adds an extra digit + $value[count($value)] = 0; // just in case the carry adds an extra digit $carry = 0; for ($i = 0, $j = 1; $j < $size; $i+=2, $j+=2) { @@ -2137,7 +2137,7 @@ class Math_BigInteger if ($this->_compare($result, false, $temp[MATH_BIGINTEGER_VALUE], $temp[MATH_BIGINTEGER_SIGN]) < 0) { $corrector_value = $this->_array_repeat(0, $n_length + 1); - $corrector_value[] = 1; + $corrector_value[count($corrector_value)] = 1; $result = $this->_add($result, false, $corrector_value, false); $result = $result[MATH_BIGINTEGER_VALUE]; } @@ -3482,7 +3482,7 @@ class Math_BigInteger } if ( $carry ) { - $this->value[] = $carry; + $this->value[count($this->value)] = $carry; } while ($num_digits--) {