Skip to content

Commit b5dce66

Browse files
committed
bug fix for php 7.1. travis removed
1 parent 6ab71da commit b5dce66

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ImageResize.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ public function __construct($filename)
111111

112112
$finfo = finfo_open(FILEINFO_MIME_TYPE);
113113
$checkWebp = false;
114-
if (strstr(finfo_file($finfo, $filename), 'image') === false) {
115-
if (version_compare(PHP_VERSION, '7.1.0', '<') && strstr(file_get_contents($filename), 'WEBPVP8') !== false) {
114+
if (strstr(finfo_file($finfo, $filename), 'image') === false || version_compare(PHP_VERSION, '7.1.0', '<')) {
115+
if (strstr(file_get_contents($filename), 'WEBPVP8') !== false) {
116116
$checkWebp = true;
117117
$this->source_type = IMAGETYPE_WEBP;
118118
} else {

0 commit comments

Comments
 (0)