From b5013e4ff99670daefbb78fd77937cd2a7d0eab9 Mon Sep 17 00:00:00 2001 From: Kavalar Date: Wed, 17 May 2023 01:19:52 +0300 Subject: [PATCH] fix comment --- frontend/modules/api/controllers/CommentController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/modules/api/controllers/CommentController.php b/frontend/modules/api/controllers/CommentController.php index ae0febb..015f870 100644 --- a/frontend/modules/api/controllers/CommentController.php +++ b/frontend/modules/api/controllers/CommentController.php @@ -125,7 +125,9 @@ class CommentController extends ApiController $request['user_id'] = $user_id; - $model->load($request, ''); + $put = array_diff($request, [null, '']); + + $model->load($put, ''); if (!$model->save()) { return $model->errors;