Skip to content

Commit 498a85a

Browse files
committed
Fix php 8.5 deprecation
1 parent 9b42ff4 commit 498a85a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/FontLib/BinaryStream.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,13 @@ public function write($data, $length = null) {
158158
}
159159

160160
public function readUInt8() {
161-
return ord($this->read(1));
161+
$uint8 = $this->read(1);
162+
163+
if ($uint8 === '') {
164+
$uint8 = '0';
165+
}
166+
167+
return ord($uint8);
162168
}
163169

164170
public function readUInt8Many($count) {

0 commit comments

Comments
 (0)