diff --git a/src/utils/Utils.php b/src/utils/Utils.php index af283412..2131b6e2 100644 --- a/src/utils/Utils.php +++ b/src/utils/Utils.php @@ -637,7 +637,7 @@ class Utils{ } public static function readLong($x, $signed = true){ - return @unpack("J", $x)[1]; //signed is useless since number cant be more than 2^63-1 in php + return strlen($x) < 8 ? 0 : @unpack("J", $x)[1]; //signed is useless since number cant be more than 2^63-1 in php } public static function writeLLong($value){