Skip to content

Commit d6dba34

Browse files
committed
fixing problem with php 5.6
1 parent cf24724 commit d6dba34

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lib/ImageResize.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,9 @@ public function __construct($filename)
112112
$finfo = finfo_open(FILEINFO_MIME_TYPE);
113113
$checkWebp = false;
114114
if (strstr(finfo_file($finfo, $filename), 'image') === false) {
115-
if (version_compare(PHP_VERSION, '7.1', '<')) {
116-
if (strstr(file_get_contents($filename), 'WEBPVP8') !== false) {
117-
$checkWebp = true;
118-
$this->source_type = IMAGETYPE_WEBP;
119-
}
120-
115+
if (version_compare(PHP_VERSION, '7.1', '<') && strstr(file_get_contents($filename), 'WEBPVP8') !== false) {
116+
$checkWebp = true;
117+
$this->source_type = IMAGETYPE_WEBP;
121118
} else {
122119
throw new ImageResizeException('Unsupported file type');
123120
}

0 commit comments

Comments
 (0)