]> _ Git - fluidbook-toolbox.git/commitdiff
wait #5953
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 31 May 2023 09:17:20 +0000 (11:17 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 31 May 2023 09:17:20 +0000 (11:17 +0200)
app/Models/FluidbookPublication.php

index 76bf72fd7ee73d75b30a4e24e0ab495ac430e954..302945d976d0e578be8b6e098af5a63fedef0910 100644 (file)
@@ -519,6 +519,9 @@ class FluidbookPublication extends ToolboxSettingsModel
         LinksData::getLinksAndRulers($this->id, $links, $rulers);
     }
 
+    /**
+     * @throws \Exception
+     */
     public function getLinksAssetsDimensions()
     {
         $res = [];
@@ -540,7 +543,10 @@ class FluidbookPublication extends ToolboxSettingsModel
                 continue;
             }
             $md5 = md5($link[$attr]);
-            $res['uid_' . $link['uid']] = $res[$md5] = ['name' => $link[$attr], 'dim' => Image::getimagesize($file), 'url' => url('/fluidbook-publication/' . $this->id . '/edit/links/assets/' . $link[$attr])];
+            $dim = Image::getimagesize($file);
+            if (null !== $dim) {
+                $res['uid_' . $link['uid']] = $res[$md5] = ['name' => $link[$attr], 'dim' => $dim, 'url' => url('/fluidbook-publication/' . $this->id . '/edit/links/assets/' . $link[$attr])];
+            }
         }
         return $res;
     }