Remove id check

master
Vitaliy Filippov 2019-05-05 01:02:19 +03:00
parent ec3d63d6c5
commit ea669d673f
1 changed files with 2 additions and 4 deletions

View File

@ -4,7 +4,7 @@
* Simple file upload layer. Handles file metadata and storage
* FileUtils: part that handles image metadata and thumbnails
*
* Version 2019-05-01
* Version 2019-05-05
* (c) Vitaliy Filippov 2018+
*/
@ -395,8 +395,6 @@ class FileUtils
*/
public static function getThumbSize($file, $width, $height, $crop = false)
{
if (empty($file['id']))
return NULL;
if ($width < 0)
$width = 0;
if ($height < 0)
@ -475,7 +473,7 @@ class FileUtils
else
{
$p = $crop == FileUtils::CROP_Y ? 'cy' : ($crop == FileUtils::CROP_X ? 'cx' : 'c');
$type = intval($width).'x'.intval($height).'_'.$alignY;
$type = intval($width).'x'.intval($height).'_'.$p.$alignY;
}
return [ 'width' => $width, 'height' => $height, 'type' => $type ];
}