Skip to content

Commit

Permalink
Merge pull request #65 from eddmann/session-empty-string
Browse files Browse the repository at this point in the history
Fix empty session value in Symfony adapter
  • Loading branch information
mnapoli authored Sep 21, 2018
2 parents 2d42ce7 + 5f5c681 commit 46e54ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Bridge/Symfony/SymfonyAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ public function handle(ServerRequestInterface $request): ResponseInterface
return (new DiactorosFactory)->createResponse($symfonyResponse);
}

private function loadSessionFromRequest(Request $symfonyRequest): ?string
private function loadSessionFromRequest(Request $symfonyRequest): string
{
if ($this->hasSessionsDisabled()) {
return null;
return '';
}

$this->httpKernel->getContainer()->get('session')->setId(
$sessionId = $symfonyRequest->cookies->get(session_name())
$sessionId = $symfonyRequest->cookies->get(session_name(), '')
);

return $sessionId;
Expand Down

0 comments on commit 46e54ff

Please sign in to comment.