From 6c165259e65c5e4d3d47de1b4598eee8a0cb052b Mon Sep 17 00:00:00 2001 From: poyuk Date: Wed, 10 May 2023 13:00:07 +0200 Subject: [PATCH] fix: use tryUnpack on readInteger --- src/qtism/common/storage/BinaryStreamAccess.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qtism/common/storage/BinaryStreamAccess.php b/src/qtism/common/storage/BinaryStreamAccess.php index e98ad7a29..72042ec56 100644 --- a/src/qtism/common/storage/BinaryStreamAccess.php +++ b/src/qtism/common/storage/BinaryStreamAccess.php @@ -127,7 +127,7 @@ public function readInteger(): int try { $bin = $this->getStream()->read(4); - return (int)current(unpack('l', $bin)); + return (int)current($this->tryUnpack('l', $bin)); } catch (StreamException $e) { $this->handleBinaryStreamException($e, BinaryStreamAccessException::INT); }