mirror of
https://github.com/danog/phpseclib.git
synced 2024-12-14 18:15:39 +01:00
Bugfix
This commit is contained in:
parent
1a730d1fa0
commit
273ad17800
@ -141,7 +141,6 @@ class BigInteger implements \Serializable
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($x instanceof self::$mainEngine) {
|
||||
$this->value = clone $x;
|
||||
} elseif ($x instanceof BigInteger\Engines\Engine) {
|
||||
@ -719,4 +718,4 @@ class BigInteger implements \Serializable
|
||||
{
|
||||
$this->value = clone $this->value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1036,4 +1036,4 @@ abstract class Engine implements \Serializable
|
||||
}
|
||||
return $max;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -70,13 +70,6 @@ abstract class PHP extends Engine
|
||||
* @access protected
|
||||
*/
|
||||
const ENGINE_DIR = 'PHP';
|
||||
|
||||
/**
|
||||
* Primes > 2 and < 1000
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected static $primes;
|
||||
|
||||
/**
|
||||
* Default constructor
|
||||
@ -1279,7 +1272,7 @@ abstract class PHP extends Engine
|
||||
}
|
||||
|
||||
$value = $this->value;
|
||||
foreach (self::$primes as $prime) {
|
||||
foreach (static::$primes as $prime) {
|
||||
list(, $r) = self::divide_digit($value, $prime);
|
||||
if (!$r) {
|
||||
return count($value) == 1 && $value[0] == $prime;
|
||||
|
Loading…
Reference in New Issue
Block a user