#108382 Модерация. Ошибка 500 при заведении нового бренда
This commit is contained in:
parent
fd5c48a47e
commit
7ec9dd1e57
1
File.php
1
File.php
|
@ -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]))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue