Skip to content

Commit 31cad91

Browse files
authored
Fixes a problem with php 7.4
This would fix the issue dompdf#75
1 parent e7c227a commit 31cad91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/FontLib/AdobeFontMetrics.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ function write($file, $encoding = null) {
139139
$this->endSection("CharMetrics");
140140

141141
$kern = $font->getData("kern", "subtable");
142-
$tree = $kern["tree"];
142+
$tree = is_array($kern) ? $kern["tree"] : null;
143143

144144
if (!$encoding && is_array($tree)) {
145145
$this->startSection("KernData");

0 commit comments

Comments
 (0)