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;