1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-12-15 02:17:04 +01:00
This commit is contained in:
Daniil Gentili 2017-10-06 15:35:59 +03:00
parent 1a730d1fa0
commit 273ad17800
3 changed files with 3 additions and 11 deletions

View File

@ -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) {

View File

@ -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;