Skip to content

Commit 812007b

Browse files
committed
Remove null check that was missed in previous commit
1 parent 5068851 commit 812007b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Sentry/SentryBundle/EventListener/ExceptionListener.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,8 @@ public function onKernelRequest(GetResponseEvent $event)
9191
if (null !== $token && $this->authorizationChecker->isGranted(AuthenticatedVoter::IS_AUTHENTICATED_REMEMBERED)) {
9292
$this->setUserValue($token->getUser());
9393

94-
if (null !== $this->dispatcher) {
95-
$contextEvent = new SentryUserContextEvent($token);
96-
$this->dispatcher->dispatch(SentrySymfonyEvents::SET_USER_CONTEXT, $contextEvent);
97-
}
94+
$contextEvent = new SentryUserContextEvent($token);
95+
$this->dispatcher->dispatch(SentrySymfonyEvents::SET_USER_CONTEXT, $contextEvent);
9896
}
9997
}
10098

0 commit comments

Comments
 (0)