From a643e5bfb5430994e9995e79daf13ade6d7d0ac9 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Mon, 2 Jun 2014 20:24:25 +0200 Subject: [PATCH] Correct the remaining case by using instanceof. --- phpseclib/File/ASN1.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpseclib/File/ASN1.php b/phpseclib/File/ASN1.php index 0601f48c..8fe51018 100644 --- a/phpseclib/File/ASN1.php +++ b/phpseclib/File/ASN1.php @@ -1030,7 +1030,7 @@ class File_ASN1 case !isset($source): return $this->_encode_der(null, array('type' => FILE_ASN1_TYPE_NULL) + $mapping, null, $special); case is_int($source): - case is_object($source) && strtolower(get_class($source)) == 'math_biginteger': // TODO + case $source instanceof \phpseclib\Math\BigInteger: return $this->_encode_der($source, array('type' => FILE_ASN1_TYPE_INTEGER) + $mapping, null, $special); case is_float($source): return $this->_encode_der($source, array('type' => FILE_ASN1_TYPE_REAL) + $mapping, null, $special);