Skip to content
Snippets Groups Projects
Commit f21ca576 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

fix(housekeeping): set default sizes value + ignore illegal IFD size error to proceed with script

parent 3bfcce37
No related branches found
No related tags found
2 merge requests!167fix(housekeeping): replace the use of GLOB_BRACE with looping over file extensions,!160WIP:Feat/social interact
......@@ -48,7 +48,8 @@ class Image extends BaseMedia
{
parent::setFile($file);
if ($this->file_mimetype === 'image/jpeg' && $metadata = exif_read_data(
// @phpstan-ignore-next-line
if ($this->file_mimetype === 'image/jpeg' && $metadata = @exif_read_data(
media_path($this->file_path),
null,
true
......
......@@ -217,7 +217,10 @@ class SettingsController extends BaseController
} elseif (str_starts_with($image->file_path, 'persons')) {
$image->sizes = config('Images')
->personAvatarSizes;
} else {
$image->sizes = [];
}
$image->setFile(new File(media_path($image->file_path)));
(new MediaModel('image'))->updateMedia($image);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment