From ea669d673fb0be071a4742eba2c8f099fb3d7579 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Sun, 5 May 2019 01:02:19 +0300 Subject: [PATCH] Remove id check --- FileUtils.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/FileUtils.php b/FileUtils.php index 866d408..ecf1cda 100644 --- a/FileUtils.php +++ b/FileUtils.php @@ -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 ]; }