Skip to content

Commit

Permalink
bug #41486 [HttpKernel] Fix sessionListener when factory is injected …
Browse files Browse the repository at this point in the history
…without session (jderusse)

This PR was merged into the 5.4 branch.

Discussion
----------

[HttpKernel] Fix sessionListener when factory is injected without session

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Commits
-------

b7e9194 Fix sessionListener when factory is injected without session
  • Loading branch information
nicolas-grekas committed Jun 1, 2021
2 parents 7714648 + b7e9194 commit e2d1cb1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function onKernelRequest(RequestEvent $event)
{
parent::onKernelRequest($event);

if (!$event->isMainRequest() || !$this->container->has('session')) {
if (!$event->isMainRequest() || (!$this->container->has('session') && !$this->container->has('session_factory'))) {
return;
}

Expand Down

0 comments on commit e2d1cb1

Please sign in to comment.