Merge pull request #1 from yinsongbj/yinsongbj-patch-1

move is_string() to the front of is_numeric()
This commit is contained in:
Song 2018-11-16 15:50:01 +08:00 committed by GitHub
commit 71adaa29dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,7 +90,7 @@ class Utils
if (is_string($value)) { if (is_string($value)) {
$value = self::stripZero($value); $value = self::stripZero($value);
$hex = implode('', unpack('H*', $value)); $hex = implode('', unpack('H*', $value));
} esleif (is_numeric($value)) { } elseif (is_numeric($value)) {
// turn to hex number // turn to hex number
$bn = self::toBn($value); $bn = self::toBn($value);
$hex = $bn->toHex(true); $hex = $bn->toHex(true);