Skip to content

Commit c0cdcb9

Browse files
committed
Fix Error when using a no authenticated token
1 parent 8123aff commit c0cdcb9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/EventListener/ExceptionListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function onKernelRequest(GetResponseEvent $event)
8383

8484
$token = $this->tokenStorage->getToken();
8585

86-
if (null !== $token && $this->authorizationChecker->isGranted(AuthenticatedVoter::IS_AUTHENTICATED_REMEMBERED)) {
86+
if (null !== $token && $token->isAuthenticated() && $this->authorizationChecker->isGranted(AuthenticatedVoter::IS_AUTHENTICATED_REMEMBERED)) {
8787
$this->setUserValue($token->getUser());
8888

8989
$contextEvent = new SentryUserContextEvent($token);

0 commit comments

Comments
 (0)