Skip to content

Commit 40a4b07

Browse files
committed
Merge branch '4.4' into 5.1
2 parents 897796b + aab7984 commit 40a4b07

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)