From 31cad9151aa2a7070e73bc53dc2d104fdce7e0c6 Mon Sep 17 00:00:00 2001 From: LinkingYou Date: Thu, 19 Dec 2019 16:40:08 +0100 Subject: [PATCH] Fixes a problem with php 7.4 This would fix the issue #75 --- src/FontLib/AdobeFontMetrics.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FontLib/AdobeFontMetrics.php b/src/FontLib/AdobeFontMetrics.php index a62daaa..a0e973b 100644 --- a/src/FontLib/AdobeFontMetrics.php +++ b/src/FontLib/AdobeFontMetrics.php @@ -139,7 +139,7 @@ function write($file, $encoding = null) { $this->endSection("CharMetrics"); $kern = $font->getData("kern", "subtable"); - $tree = $kern["tree"]; + $tree = is_array($kern) ? $kern["tree"] : null; if (!$encoding && is_array($tree)) { $this->startSection("KernData");