Skip to content

Commit 010c3e0

Browse files
authored
Merge pull request #37 from BrunoDeBarros/patch-1
Fixes an "Undefined offset: 1" PHP Notice.
2 parents f6d1257 + 85cb7e3 commit 010c3e0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/FontLib/BinaryStream.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,9 @@ public function w($type, $data) {
419419

420420
$ret = 0;
421421
for ($i = 0; $i < $type[1]; $i++) {
422-
$ret += $this->w($type[0], $data[$i]);
422+
if (isset($data[$i])) {
423+
$ret += $this->w($type[0], $data[$i]);
424+
}
423425
}
424426

425427
return $ret;

0 commit comments

Comments
 (0)