diff --git a/CHANGELOG.md b/CHANGELOG.md index e6f7cc9..b23dbe9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. --- +## [3.1.1] - 06-01-2023 + +### Fixed + +- `isReadableImage` now returns false when `exif_imagetype` returns false instead of throwing exception + ## [3.1.0] - 31-10-2022 ### Fixed diff --git a/src/Classes/MediaHandler.php b/src/Classes/MediaHandler.php index 2384d56..b669594 100644 --- a/src/Classes/MediaHandler.php +++ b/src/Classes/MediaHandler.php @@ -98,6 +98,8 @@ public function isReadableImage($file): bool try { $type = exif_imagetype($file); + if (!$type) return false; + // https://github.com/Intervention/image/pull/1008 return !in_array($type, [IMAGETYPE_ICO]); } catch (Exception $e) {