From 37535744b269f5f3e5044a23122bacdbfbd84d82 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sat, 21 Nov 2015 22:55:20 -0500 Subject: [PATCH] small tweaks --- phpseclib/File/ASN1.php | 2 +- phpseclib/Math/BigInteger.php | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/phpseclib/File/ASN1.php b/phpseclib/File/ASN1.php index 8677521b..f5c3e448 100644 --- a/phpseclib/File/ASN1.php +++ b/phpseclib/File/ASN1.php @@ -677,7 +677,7 @@ class File_ASN1 } // Fail mapping if all input items have not been consumed. - return $i < $n? null: $map; + return $i < $n ? null: $map; // the main diff between sets and sequences is the encapsulation of the foreach in another for loop case FILE_ASN1_TYPE_SET: diff --git a/phpseclib/Math/BigInteger.php b/phpseclib/Math/BigInteger.php index 4ab30d83..4ba64240 100644 --- a/phpseclib/Math/BigInteger.php +++ b/phpseclib/Math/BigInteger.php @@ -811,6 +811,18 @@ class Math_BigInteger } } + /** + * __debugInfo() magic method + * + * Will be called, automatically, when print_r() or var_dump() are called + * + * @access public + */ + function __debugInfo() + { + return array('value' => '0x' . $this->toHex(true)); + } + /** * Adds two BigIntegers. *