aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-05-25 08:14:59 +0000
committerMario <mario@mariovavti.com>2022-05-25 08:14:59 +0000
commit6d00b2e63dba0761d2bb82b56c59f9bacce97b7c (patch)
tree6b4f948a2076cfcf18e8d87555cb0774fe855e9e /Zotlabs
parent7be1415a3ad6de60c4511fa6d7799755384125d5 (diff)
downloadvolse-hubzilla-6d00b2e63dba0761d2bb82b56c59f9bacce97b7c.tar.gz
volse-hubzilla-6d00b2e63dba0761d2bb82b56c59f9bacce97b7c.tar.bz2
volse-hubzilla-6d00b2e63dba0761d2bb82b56c59f9bacce97b7c.zip
bump php version requirement
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Setup.php4
-rw-r--r--Zotlabs/Photo/PhotoDriver.php16
2 files changed, 7 insertions, 13 deletions
diff --git a/Zotlabs/Module/Setup.php b/Zotlabs/Module/Setup.php
index f068cbef8..3a188d9ce 100644
--- a/Zotlabs/Module/Setup.php
+++ b/Zotlabs/Module/Setup.php
@@ -387,8 +387,8 @@ class Setup extends \Zotlabs\Web\Controller {
function check_php(&$phpath, &$checks) {
$help = '';
- if(version_compare(PHP_VERSION, '7.1') < 0) {
- $help .= t('PHP version 7.1 or greater is required.');
+ if(version_compare(PHP_VERSION, '8.0') < 0) {
+ $help .= t('PHP version 8.0 or greater is required.');
$this->check_add($checks, t('PHP version'), false, true, $help);
}
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;