From e604d563fcf93129ba13ee6d3be04863634fde0c Mon Sep 17 00:00:00 2001 From: Alessandro Belli Date: Tue, 7 Nov 2023 14:07:55 +0100 Subject: [PATCH] Update State.php - check if any font was detected to avoid crash. If no font was detected, go on without it. --- src/Html/State.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Html/State.php b/src/Html/State.php index ab234f6..308487c 100644 --- a/src/Html/State.php +++ b/src/Html/State.php @@ -63,7 +63,7 @@ public function PrintStyle() // if($this->state->end_underline) {$span .= "text-decoration:none;";} if($this->strike) $style .= "text-decoration:line-through;"; if($this->hidden) $style .= "display:none;"; - if(isset($this->font)) { + if(isset($this->font) && count( self::$fonttbl)>0) { $font = self::$fonttbl[$this->font]; $style .= $font->toStyle(); } @@ -113,4 +113,4 @@ public function equals($state) return true; } -} \ No newline at end of file +}