]> _ Git - cubist_util.git/commitdiff
wait #5953
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 31 May 2023 09:18:45 +0000 (11:18 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 31 May 2023 09:18:45 +0000 (11:18 +0200)
src/Graphics/Image.php

index f7f21ab3820b9e255aba18eb2638da8a4ce10139..baba4a780fc76ac524e090ab5a552fe2433caf15 100644 (file)
@@ -49,7 +49,9 @@ class Image
         $res = false;
         if ($ext === 'pdf') {
             $i = PDFTools::infos($path);
-            $res = $i['infos']['size'];
+            if (isset($i, $i['infos'], $i['infos']['size'])) {
+                $res = $i['infos']['size'];
+            }
         } else if ($ext === 'svg') {
             $svg = simplexml_load_string(file_get_contents($path));
             $attr = $svg->attributes();
@@ -68,7 +70,9 @@ class Image
             );
         } else if ($ext === 'oam') {
             $oam = OAMAnimation::getOAMData($path);
-            $res = [$oam['width'], $oam['height']];
+            if (null !== $oam) {
+                $res = [$oam['width'], $oam['height']];
+            }
         } else if ($ext === 'zip') {
             $zip = ZipAnimation::getZIPData($path);
             if (null !== $zip) {