Skip to content

Commit

Permalink
Exif reader: avoid converting stream to string to stream
Browse files Browse the repository at this point in the history
  • Loading branch information
mlocati committed Jul 30, 2024
1 parent fea4f3e commit 4aebb51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Image/Metadata/ExifMetadataReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ protected function extractFromData($data)
*/
protected function extractFromStream($resource)
{
return $this->doReadData(stream_get_contents($resource));
return PHP_VERSION_ID < 70200 ? $this->doReadData(stream_get_contents($resource)) : $this->extract($resource);
}

/**
Expand Down

0 comments on commit 4aebb51

Please sign in to comment.