Skip to content

Commit 608f114

Browse files
committed
PHP7.0以上の時にのみimagewebp()を使う。関数が存在していても画像が正しく処理されない。
1 parent b48251b commit 608f114

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

petitnote/thumbnail_gd.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ function thumb($path,$fname,$time,$max_w,$max_h,$options=[]){
113113
}
114114
break;
115115
case "image/webp";
116-
if(function_exists("ImageWEBP")){
116+
if(function_exists("ImageWEBP")&&version_compare(PHP_VERSION, '7.0.0', '>=')){
117117
ImageWEBP($im_out, $outfile,98);
118118
}else{
119119
ImageJPEG($im_out, $outfile,98);

0 commit comments

Comments
 (0)