Skip to content

Commit 8fd41d2

Browse files
bscheshirworkthiagotalma
authored andcommitted
avoid echo call (#1003)
Fix #1002
1 parent 120ab9e commit 8fd41d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controllers/AdminController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ protected function performAjaxValidation($model)
509509
if (\Yii::$app->request->isAjax && !\Yii::$app->request->isPjax) {
510510
if ($model->load(\Yii::$app->request->post())) {
511511
\Yii::$app->response->format = Response::FORMAT_JSON;
512-
echo json_encode(ActiveForm::validate($model));
512+
\Yii::$app->response->data = json_encode(ActiveForm::validate($model));
513513
\Yii::$app->end();
514514
}
515515
}

0 commit comments

Comments
 (0)