mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-25 11:20:03 +00:00
Restore compatibility with PHP 5.6.1 by using explicit array indexes.
This seems to be caused by the resolution of PHP Ticket 67985.
This commit is contained in:
parent
564c678df5
commit
ad03d84461
@ -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--) {
|
||||
|
Loading…
Reference in New Issue
Block a user