diff --git a/lib/Db/Util.php b/lib/Db/Util.php index bd6b8f69..10418a96 100644 --- a/lib/Db/Util.php +++ b/lib/Db/Util.php @@ -34,6 +34,10 @@ class Util { */ public static function getExifFromFile(File &$file) { $handle = $file->fopen('rb'); + if (!$handle) { + throw new \Exception('Could not open file'); + } + $exif = self::getExifFromStream($handle); fclose($handle); return $exif;