#108382 Модерация. Ошибка 500 при заведении нового бренда

This commit is contained in:
Александр Рыбкин 2025-02-10 11:24:55 +03:00
parent fd5c48a47e
commit 7ec9dd1e57
1 changed files with 1 additions and 0 deletions

View File

@ -375,6 +375,7 @@ class File extends \yii\db\ActiveRecord
$patch = $this->getDir(true); $patch = $this->getDir(true);
$fileName = $this->name . '.' . $this->ext; $fileName = $this->name . '.' . $this->ext;
$filePatch = $patch . $fileName; $filePatch = $patch . $fileName;
$this->cropFile = $this->cropFile && file_exists($this->cropFile) ? $this->cropFile : null;
$quality = $quality > 100 || $quality <= 0 ? 90 : $quality; $quality = $quality > 100 || $quality <= 0 ? 90 : $quality;
if (file_exists($filePatch) && in_array(exif_imagetype($filePatch), [IMAGETYPE_JPEG, IMAGETYPE_PNG])) if (file_exists($filePatch) && in_array(exif_imagetype($filePatch), [IMAGETYPE_JPEG, IMAGETYPE_PNG]))
{ {