Skip to content

Commit 9a74037

Browse files
committed
Improve comparsion remove exif data from other images
1 parent 58fbad4 commit 9a74037

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

app/code/Magento/MediaGalleryMetadata/Model/Png/Segment/ReadExif.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ private function getExifData(SegmentInterface $segment): MetadataInterface
7070
$description = null;
7171
$keywords = [];
7272

73-
$data = exif_read_data('data://image/jpeg;base64,' . base64_encode($segment->getData()));
7473

7574
if ($data) {
7675
$title = isset($data['DocumentName']) ? $data['DocumentName'] : null;
@@ -92,6 +91,6 @@ private function getExifData(SegmentInterface $segment): MetadataInterface
9291
*/
9392
private function isExifSegment(SegmentInterface $segment): bool
9493
{
95-
return $segment->getName() === self::EXIF_SEGMENT_NAME;
94+
return strcmp($segment->getName(), self::EXIF_SEGMENT_NAME) === 0;
9695
}
9796
}
Loading

0 commit comments

Comments
 (0)