Simplified condition and removed unused code from AbstractSessionListener::onKernelRequest
This commit is contained in:
parent
ed576b2554
commit
d344b8d6cb
@ -53,14 +53,13 @@ abstract class AbstractSessionListener implements EventSubscriberInterface
|
||||
return;
|
||||
}
|
||||
|
||||
$session = null;
|
||||
$request = $event->getRequest();
|
||||
if (!$request->hasSession()) {
|
||||
$sess = null;
|
||||
$request->setSessionFactory(function () use (&$sess) { return $sess ?? $sess = $this->getSession(); });
|
||||
}
|
||||
|
||||
$session = $session ?? ($this->container && $this->container->has('initialized_session') ? $this->container->get('initialized_session') : null);
|
||||
$session = $this->container && $this->container->has('initialized_session') ? $this->container->get('initialized_session') : null;
|
||||
$this->sessionUsageStack[] = $session instanceof Session ? $session->getUsageIndex() : 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user