From: fomichev Date: Fri, 29 Nov 2024 13:19:09 +0000 (+0300) Subject: Форматирование кода X-Git-Tag: 1.7~212^2~2 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=707bf2b497c2498a4b86b342a3a0663cd833ccec;p=erp24_rep%2Fyii-erp24%2F.git Форматирование кода --- diff --git a/erp24/controllers/ProductsController.php b/erp24/controllers/ProductsController.php index bf79b5ff..f6451375 100755 --- a/erp24/controllers/ProductsController.php +++ b/erp24/controllers/ProductsController.php @@ -198,7 +198,6 @@ class ProductsController extends Controller return $this->asJson(['error' => 'ID товара не передан']); } - $characteristics = Products1cAdditionalCharacteristics::find() ->where(['product_id' => $productId]) ->asArray() @@ -232,8 +231,6 @@ class ProductsController extends Controller $id = Yii::$app->request->post('id'); if (!empty($id)) { $id = htmlentities($id); - - $data = ProductsClass::find()->where(['category_id' => $id])->all(); $data2 = []; @@ -262,7 +259,6 @@ class ProductsController extends Controller if (!empty($parent_id)) { $parent_id = htmlentities($parent_id); - $data = Products1c::find() ->alias('p') ->select(['p.id', 'p.name', 'alias.entity_id', 'p.view']) @@ -442,6 +438,7 @@ class ProductsController extends Controller } else { $errors = $productOption->getErrors(); $errorMessages = []; + foreach ($errors as $attribute => $messages) { foreach ($messages as $message) { $errorMessages[] = "Ошибка в поле '{$attribute}': {$message}";