Skip to content

Commit

Permalink
FIX: performAjaxValidation to return instgead echo
Browse files Browse the repository at this point in the history
  • Loading branch information
TonisOrmisson committed Sep 12, 2018
1 parent bf3b170 commit 8a63d4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down

0 comments on commit 8a63d4c

Please sign in to comment.