Skip to content

Commit f563290

Browse files
Доработки
1 parent 8aaa1ca commit f563290

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/models/ShopStoreProduct.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,13 @@ public function loadDataToElementProduct(ShopCmsContentElement $model, ShopProdu
378378

379379
if (is_string($value) && $value) {
380380
$value = (string) $value;
381-
$storageFile = \Yii::$app->storage->upload($value);
382-
$model->image_id = $storageFile->id;
381+
try {
382+
$storageFile = \Yii::$app->storage->upload($value);
383+
$model->image_id = $storageFile->id;
384+
} catch (\Exception $exception) {
385+
386+
}
387+
383388
}
384389

385390
}

0 commit comments

Comments
 (0)