Skip to content

Commit

Permalink
Merge pull request #36439 from nextcloud/backport/36420/stable25
Browse files Browse the repository at this point in the history
[stable25] fix the exif_read_data issue
  • Loading branch information
artonge authored Jan 31, 2023
2 parents b5dfa5f + 4dd1358 commit 56dd7cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/private/Metadata/Provider/ExifProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ public function execute(File $file): array {
// 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();
Expand Down

0 comments on commit 56dd7cb

Please sign in to comment.