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);