Fix fatal error in PHP 8.0 when thumbnail size is not given as integer

This commit is contained in:
Kijin Sung 2021-11-22 15:01:28 +09:00
parent 0118962a8f
commit ae44f26bc5
3 changed files with 11 additions and 0 deletions

View file

@ -506,7 +506,10 @@ class FileHandler
return false;
}
// sanitize params
$target_file = self::getRealPath($target_file);
$resize_width = intval($resize_width);
$resize_height = $resize_height === 'auto' ? 'auto' : intval($resize_height);
if(!$resize_width)
{
$resize_width = 100;