Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
28 | public function Redirect(GetResponseForExceptionEvent $event) |
||
29 | { |
||
30 | if ($event->getException() instanceof RedirectException) { |
||
31 | $redirectResponse = new RedirectResponse($event->getException()->getRedirectResponse()); |
||
32 | |||
33 | if($event->getException()->getMessage() !== ""){ |
||
34 | $this->addFlashMessage(FlashMessageCategory::ERROR, $event->getException()->getMessage()); |
||
35 | } |
||
36 | |||
37 | $event->setResponse($redirectResponse); |
||
38 | } |
||
41 | } |