PHP8 에서 경고문이 나올수 있는 코드 추가 수정

This commit is contained in:
thisgun
2021-01-25 16:17:06 +09:00
parent 8679f23fa5
commit b0b4c5b419
4 changed files with 9 additions and 2 deletions

View File

@ -471,6 +471,9 @@ function get_it_thumbnail($img, $width, $height=0, $id='', $is_crop=false)
if(is_file($file))
$size = @getimagesize($file);
if (! (isset($size) && is_array($size)))
return '';
if($size[2] < 1 || $size[2] > 3)
return '';