File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ private function handleAccessDeniedException(GetResponseForExceptionEvent $event
183183
184184 private function handleLogoutException (GetResponseForExceptionEvent $ event , LogoutException $ exception ): void
185185 {
186- $ event ->setException (new AccessDeniedHttpException ($ exception ->getMessage (), $ exception ));
186+ $ event ->setThrowable (new AccessDeniedHttpException ($ exception ->getMessage (), $ exception ));
187187
188188 if (null !== $ this ->logger ) {
189189 $ this ->logger ->info ('A LogoutException was thrown; wrapping with AccessDeniedHttpException ' , ['exception ' => $ exception ]);
Original file line number Diff line number Diff line change @@ -165,8 +165,8 @@ public function testLogoutException()
165165 $ listener = $ this ->createExceptionListener ();
166166 $ listener ->onKernelException ($ event );
167167
168- $ this ->assertEquals ('Invalid CSRF. ' , $ event ->getException ()->getMessage ());
169- $ this ->assertEquals (403 , $ event ->getException ()->getStatusCode ());
168+ $ this ->assertEquals ('Invalid CSRF. ' , $ event ->getThrowable ()->getMessage ());
169+ $ this ->assertEquals (403 , $ event ->getThrowable ()->getStatusCode ());
170170 }
171171
172172 public function getAccessDeniedExceptionProvider ()
You can’t perform that action at this time.
0 commit comments