Handle some fatal errors

This commit is contained in:
Michael
2022-12-11 16:48:36 +00:00
parent 35ce394948
commit 5d3248d57b
2 changed files with 10 additions and 4 deletions
+5 -2
View File
@@ -247,8 +247,11 @@ class Images
if ($data) {
$image = new Image($img_str);
$data['blurhash'] = $image->getBlurHash();
$data['size'] = $filesize;
if ($image->isValid()) {
$data['blurhash'] = $image->getBlurHash();
}
$data['size'] = $filesize;
}
return is_array($data) ? $data : [];