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