GMP compatibility with PHP 5.6
authorDan Fuhry <dan@enanocms.org>
Mon, 24 Nov 2014 11:40:24 -0500
changeset 13800e400f946644
parent 1379 5cbd678df965
child 1381 6b25c6bfd246
GMP compatibility with PHP 5.6
includes/math.php
     1.1 --- a/includes/math.php	Wed Aug 21 23:11:58 2013 -0400
     1.2 +++ b/includes/math.php	Mon Nov 24 11:40:24 2014 -0500
     1.3 @@ -29,7 +29,7 @@
     1.4  	
     1.5  	function init($int, $base = 10)
     1.6  	{
     1.7 -		return ( is_resource($int) ) ? $int : gmp_init($int, $base);
     1.8 +		return ( is_resource($int) || (is_object($int) && $int instanceof \GMP) ) ? $int : gmp_init($int, $base);
     1.9  	}
    1.10  	
    1.11  	/**