Check handle before using it
parent
83f4db77e8
commit
42b0a82e3f
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue