Skip to content

Commit 46af71a

Browse files
committed
Merge branch '5.1' into 5.x
2 parents e89657d + 40a4b07 commit 46af71a

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

EventListener/AbstractSessionListener.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,8 @@ public function onKernelRequest(RequestEvent $event)
5858

5959
$session = null;
6060
$request = $event->getRequest();
61-
if ($request->hasSession()) {
62-
// no-op
63-
} elseif (method_exists($request, 'setSessionFactory')) {
61+
if (!$request->hasSession()) {
6462
$request->setSessionFactory(function () { return $this->getSession(); });
65-
} elseif ($session = $this->getSession()) {
66-
$request->setSession($session);
6763
}
6864

6965
$session = $session ?? ($this->container && $this->container->has('initialized_session') ? $this->container->get('initialized_session') : null);

0 commit comments

Comments
 (0)