Merge pull request #36420 from nextcloud/enh/34958/fix-exif-log

fix the exif_read_data issue
This commit is contained in:
Louis 2023-01-30 15:41:47 +01:00 committed by GitHub
commit 3bfc5a4d95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,10 +56,10 @@ class ExifProvider implements IMetadataProvider {
// But I don't understand why 1 as a special meaning.
// Revert right after reading the exif data.
$oldBufferSize = stream_set_chunk_size($fileDescriptor, 1);
$data = exif_read_data($fileDescriptor, 'ANY_TAG', true);
$data = @exif_read_data($fileDescriptor, 'ANY_TAG', true);
stream_set_chunk_size($fileDescriptor, $oldBufferSize);
} catch (\Exception $ex) {
$this->logger->warning("Couldn't extract metadata for ".$file->getId(), ['exception' => $ex]);
$this->logger->info("Couldn't extract metadata for ".$file->getId(), ['exception' => $ex]);
}
$size = new FileMetadata();