diff --git a/controllers/AdminController.php b/controllers/AdminController.php index 06b4b8b1c..6a0eb5134 100644 --- a/controllers/AdminController.php +++ b/controllers/AdminController.php @@ -509,7 +509,7 @@ protected function performAjaxValidation($model) if (\Yii::$app->request->isAjax && !\Yii::$app->request->isPjax) { if ($model->load(\Yii::$app->request->post())) { \Yii::$app->response->format = Response::FORMAT_JSON; - echo json_encode(ActiveForm::validate($model)); + return json_encode(ActiveForm::validate($model)); \Yii::$app->end(); } }