mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-30 02:28:31 +00:00
Merge branch 'master' into php5
* master: BigInteger: accomodate GMP change in PHP 5.6
This commit is contained in:
commit
da02246cc4
@ -326,7 +326,10 @@ class BigInteger
|
|||||||
|
|
||||||
switch ( MATH_BIGINTEGER_MODE ) {
|
switch ( MATH_BIGINTEGER_MODE ) {
|
||||||
case MATH_BIGINTEGER_MODE_GMP:
|
case MATH_BIGINTEGER_MODE_GMP:
|
||||||
if (is_resource($x) && get_resource_type($x) == 'GMP integer') {
|
switch (true) {
|
||||||
|
case is_resource($x) && get_resource_type($x) == 'GMP integer':
|
||||||
|
// PHP 5.6 switched GMP from using resources to objects
|
||||||
|
case is_object($x) && get_class($x) == 'GMP':
|
||||||
$this->value = $x;
|
$this->value = $x;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user