From: Vincent Vanwaelscappel Date: Wed, 31 May 2023 09:18:45 +0000 (+0200) Subject: wait #5953 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=6ed5af452f05d793ba1b31fdb6ca40fb76fac741;p=cubist_util.git wait #5953 --- diff --git a/src/Graphics/Image.php b/src/Graphics/Image.php index f7f21ab..baba4a7 100644 --- a/src/Graphics/Image.php +++ b/src/Graphics/Image.php @@ -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) {