Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
try to fix the exif_read_data issue
Signed-off-by: Simon L <[email protected]>
  • Loading branch information
szaimen committed Jan 28, 2023
commit a704619ea493f528fb857a57d34ce0990546635e
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);
Copy link
Contributor Author

@szaimen szaimen Jan 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was actually the only way how I could suppress the log message when testing with https://user-images.githubusercontent.com/12234510/205661916-3e7b14b4-6d4b-4dc2-9903-5265f95a2aee.png

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

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