mirror of
https://code.castopod.org/adaures/castopod
synced 2025-06-03 16:02:02 +00:00
fix(housekeeping): set default sizes value + ignore illegal IFD size error to proceed with script
This commit is contained in:
parent
3bfcce3751
commit
f21ca57603
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user