From ad9c004bb247ccc1d44c54647ef723482360fccb Mon Sep 17 00:00:00 2001 From: Yarik Date: Mon, 16 May 2016 16:52:40 +0300 Subject: [PATCH] test --- common/modules/comment/widgets/CommentWidget.php | 1 + frontend/controllers/CompanyController.php | 4 ++++ 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/common/modules/comment/widgets/CommentWidget.php b/common/modules/comment/widgets/CommentWidget.php index 2e03118..c498f55 100644 --- a/common/modules/comment/widgets/CommentWidget.php +++ b/common/modules/comment/widgets/CommentWidget.php @@ -277,6 +277,7 @@ $this->comment_class->checkRating(); if($this->comment_class->rating->load($data) && $this->comment_class->rating->save()) { $this->isSuccess = true; + \Yii::$app->response->redirect(''); } } else { $this->isSuccess = true; diff --git a/frontend/controllers/CompanyController.php b/frontend/controllers/CompanyController.php index cd7c88f..35869c0 100755 --- a/frontend/controllers/CompanyController.php +++ b/frontend/controllers/CompanyController.php @@ -368,6 +368,10 @@ { $company = User::findOne($company_id); + if(empty($company)) { + throw new NotFoundHttpException('Company not found'); + } + return $this->render('review', [ 'company' => $company, ]); -- libgit2 0.21.4