File tree 2 files changed +3
-3
lines changed
src/Symfony/Component/Security/Http
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
183
183
184
184
private function handleLogoutException (GetResponseForExceptionEvent $ event , LogoutException $ exception ): void
185
185
{
186
- $ event ->setException (new AccessDeniedHttpException ($ exception ->getMessage (), $ exception ));
186
+ $ event ->setThrowable (new AccessDeniedHttpException ($ exception ->getMessage (), $ exception ));
187
187
188
188
if (null !== $ this ->logger ) {
189
189
$ 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()
165
165
$ listener = $ this ->createExceptionListener ();
166
166
$ listener ->onKernelException ($ event );
167
167
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 ());
170
170
}
171
171
172
172
public function getAccessDeniedExceptionProvider ()
You can’t perform that action at this time.
0 commit comments