Merge pull request #12389 from annando/fatal

Handle some fatal errors
This commit is contained in:
Hypolite Petovan 2022-12-11 15:04:54 -05:00 committed by GitHub
commit 0d95535137
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

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 : [];