aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Photo/PhotoDriver.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-06-01 07:00:21 +0000
committerMario <mario@mariovavti.com>2022-06-01 07:00:21 +0000
commite63f0438415bb364f3085286ca2f199e83ab187b (patch)
treeb107429276ebfc92dc9b4f78e302a4967e5bf0a6 /Zotlabs/Photo/PhotoDriver.php
parentc5f33baf27d80e2a7ad7307eacd3137609eeb089 (diff)
parent33dd0c83e377b8adf00559337d13784ec136cecb (diff)
downloadvolse-hubzilla-7.4.tar.gz
volse-hubzilla-7.4.tar.bz2
volse-hubzilla-7.4.zip
Merge branch '7.4RC'7.4
Diffstat (limited to 'Zotlabs/Photo/PhotoDriver.php')
-rw-r--r--Zotlabs/Photo/PhotoDriver.php16
1 files changed, 5 insertions, 11 deletions
diff --git a/Zotlabs/Photo/PhotoDriver.php b/Zotlabs/Photo/PhotoDriver.php
index 6bdb89ab1..f50ef17ae 100644
--- a/Zotlabs/Photo/PhotoDriver.php
+++ b/Zotlabs/Photo/PhotoDriver.php
@@ -344,19 +344,13 @@ abstract class PhotoDriver {
return false;
}
- /*
- * PHP 7.2 allows you to use a stream resource, which should reduce/avoid
- * memory exhaustion on large images.
- */
-
- if(version_compare(PHP_VERSION, '7.2.0') >= 0) {
- $f = @fopen($filename, 'rb');
- } else {
- $f = $filename;
- }
+ $f = @fopen($filename, 'rb');
if($f) {
- return @exif_read_data($f, null, true);
+ // exif_read_data accepts a stream resource in php > 7.2
+ $x = @exif_read_data($f, null, true);
+ fclose($f);
+ return $x;
}
return false;