From 824b232b47c86e99fe81a569e1efe190bc0933c2 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Tue, 8 Mar 2022 20:53:18 -0600 Subject: [PATCH] BigInteger: add precision to __debugInfo --- phpseclib/Math/BigInteger/Engines/Engine.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpseclib/Math/BigInteger/Engines/Engine.php b/phpseclib/Math/BigInteger/Engines/Engine.php index 455cebd0..6c152202 100644 --- a/phpseclib/Math/BigInteger/Engines/Engine.php +++ b/phpseclib/Math/BigInteger/Engines/Engine.php @@ -390,10 +390,11 @@ abstract class Engine */ public function __debugInfo() { - return [ + $result = [ 'value' => '0x' . $this->toHex(true), 'engine' => basename(static::class) ]; + return $this->precision > 0 ? $result + ['precision' => $this->precision] : $result; } /**