From 498a85ad75d68fde08551a2e4d2b0b81fd9ceec9 Mon Sep 17 00:00:00 2001 From: 8ctopus Date: Thu, 27 Nov 2025 16:00:04 +0400 Subject: [PATCH] Fix php 8.5 deprecation --- src/FontLib/BinaryStream.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/FontLib/BinaryStream.php b/src/FontLib/BinaryStream.php index cc5e72c..cb2d846 100644 --- a/src/FontLib/BinaryStream.php +++ b/src/FontLib/BinaryStream.php @@ -158,7 +158,13 @@ public function write($data, $length = null) { } public function readUInt8() { - return ord($this->read(1)); + $uint8 = $this->read(1); + + if ($uint8 === '') { + $uint8 = '0'; + } + + return ord($uint8); } public function readUInt8Many($count) {