From 7ec9dd1e571039e8c3bad8d46eec417ecb22d680 Mon Sep 17 00:00:00 2001 From: Sasha Rybkin Date: Mon, 10 Feb 2025 11:24:55 +0300 Subject: [PATCH] =?UTF-8?q?#108382=20=D0=9C=D0=BE=D0=B4=D0=B5=D1=80=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D1=8F.=20=D0=9E=D1=88=D0=B8=D0=B1=D0=BA=D0=B0=2050?= =?UTF-8?q?0=20=D0=BF=D1=80=D0=B8=20=D0=B7=D0=B0=D0=B2=D0=B5=D0=B4=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B8=20=D0=BD=D0=BE=D0=B2=D0=BE=D0=B3=D0=BE=20?= =?UTF-8?q?=D0=B1=D1=80=D0=B5=D0=BD=D0=B4=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- File.php | 1 + 1 file changed, 1 insertion(+) diff --git a/File.php b/File.php index 04a3cfa..fdb7f1d 100644 --- a/File.php +++ b/File.php @@ -375,6 +375,7 @@ class File extends \yii\db\ActiveRecord $patch = $this->getDir(true); $fileName = $this->name . '.' . $this->ext; $filePatch = $patch . $fileName; + $this->cropFile = $this->cropFile && file_exists($this->cropFile) ? $this->cropFile : null; $quality = $quality > 100 || $quality <= 0 ? 90 : $quality; if (file_exists($filePatch) && in_array(exif_imagetype($filePatch), [IMAGETYPE_JPEG, IMAGETYPE_PNG])) {