Fix #1784 error when getThumbnail() uses external image with $height = 'auto'

This commit is contained in:
Kijin Sung 2021-09-07 01:48:21 +09:00
parent 74bb65a240
commit ce2d019aaf
2 changed files with 2 additions and 2 deletions

View file

@ -816,7 +816,7 @@ class commentItem extends BaseObject
if($is_img = @getimagesize($tmp_file))
{
list($_w, $_h, $_t, $_a) = $is_img;
if($_w < ($width * 0.3) && $_h < ($height * 0.3))
if($_w < ($width * 0.3) && ($height === 'auto' || $_h < ($height * 0.3)))
{
continue;
}

View file

@ -1225,7 +1225,7 @@ class documentItem extends BaseObject
if($is_img = @getimagesize($tmp_file))
{
list($_w, $_h, $_t, $_a) = $is_img;
if($_w < ($width * 0.3) && $_h < ($height * 0.3))
if($_w < ($width * 0.3) && ($height === 'auto' || $_h < ($height * 0.3)))
{
continue;
}