mirror of
https://github.com/danog/phpseclib.git
synced 2024-12-15 02:17:04 +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) {
|
if ($x instanceof self::$mainEngine) {
|
||||||
$this->value = clone $x;
|
$this->value = clone $x;
|
||||||
} elseif ($x instanceof BigInteger\Engines\Engine) {
|
} elseif ($x instanceof BigInteger\Engines\Engine) {
|
||||||
|
@ -71,13 +71,6 @@ abstract class PHP extends Engine
|
|||||||
*/
|
*/
|
||||||
const ENGINE_DIR = 'PHP';
|
const ENGINE_DIR = 'PHP';
|
||||||
|
|
||||||
/**
|
|
||||||
* Primes > 2 and < 1000
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected static $primes;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default constructor
|
* Default constructor
|
||||||
*
|
*
|
||||||
@ -1279,7 +1272,7 @@ abstract class PHP extends Engine
|
|||||||
}
|
}
|
||||||
|
|
||||||
$value = $this->value;
|
$value = $this->value;
|
||||||
foreach (self::$primes as $prime) {
|
foreach (static::$primes as $prime) {
|
||||||
list(, $r) = self::divide_digit($value, $prime);
|
list(, $r) = self::divide_digit($value, $prime);
|
||||||
if (!$r) {
|
if (!$r) {
|
||||||
return count($value) == 1 && $value[0] == $prime;
|
return count($value) == 1 && $value[0] == $prime;
|
||||||
|
Loading…
Reference in New Issue
Block a user