From 25e26a7bb9dc88a97cdbd0857012184004efdf97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=93=E5=B0=8F=E6=98=8E?= <2966980@qq.com> Date: Tue, 13 Dec 2022 00:05:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=20toHex=20=E5=85=BC=E5=AE=B9=20?= =?UTF-8?q?=E6=B5=AE=E7=82=B9=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Utils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Utils.php b/src/Utils.php index 8883c2b4..e3e0549a 100644 --- a/src/Utils.php +++ b/src/Utils.php @@ -87,7 +87,7 @@ class Utils */ public static function toHex($value, $isPrefix=false) { - if (is_numeric($value)) { + if (is_numeric($value) && gettype($value) != 'string') { // turn to hex number $bn = self::toBn($value); $hex = $bn->toHex(true);