$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();
);
} 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) {