]> _ Git - fluidbook-toolbox.git/commitdiff
wip #4214 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 21 Sep 2023 07:59:23 +0000 (09:59 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 21 Sep 2023 07:59:23 +0000 (09:59 +0200)
app/Fluidbook/Compiler/Compiler.php

index e2940114444031cc2462f9653a29f975cff5dafe..bde47cf10d764aa821f7160fa3d6840391cb3740 100644 (file)
@@ -2251,7 +2251,14 @@ class Compiler extends Base implements CompilerInterface
 
     public function addFont($fontFile)
     {
+        if (!$fontFile) {
+            return;
+        }
+
         $f = $this->wdir . '/' . $fontFile;
+        if (!file_exists($f)) {
+            return;
+        }
         $e = explode('.', $f);
         $ext = array_pop($e);
         $hash = 'fb_' . substr(md5($fontFile), 0, 10);