Commit ad9c004bb247ccc1d44c54647ef723482360fccb
1 parent
239b3249
test
Showing
2 changed files
with
5 additions
and
0 deletions
Show diff stats
common/modules/comment/widgets/CommentWidget.php
@@ -277,6 +277,7 @@ | @@ -277,6 +277,7 @@ | ||
277 | $this->comment_class->checkRating(); | 277 | $this->comment_class->checkRating(); |
278 | if($this->comment_class->rating->load($data) && $this->comment_class->rating->save()) { | 278 | if($this->comment_class->rating->load($data) && $this->comment_class->rating->save()) { |
279 | $this->isSuccess = true; | 279 | $this->isSuccess = true; |
280 | + \Yii::$app->response->redirect(''); | ||
280 | } | 281 | } |
281 | } else { | 282 | } else { |
282 | $this->isSuccess = true; | 283 | $this->isSuccess = true; |
frontend/controllers/CompanyController.php
@@ -368,6 +368,10 @@ | @@ -368,6 +368,10 @@ | ||
368 | { | 368 | { |
369 | $company = User::findOne($company_id); | 369 | $company = User::findOne($company_id); |
370 | 370 | ||
371 | + if(empty($company)) { | ||
372 | + throw new NotFoundHttpException('Company not found'); | ||
373 | + } | ||
374 | + | ||
371 | return $this->render('review', [ | 375 | return $this->render('review', [ |
372 | 'company' => $company, | 376 | 'company' => $company, |
373 | ]); | 377 | ]); |