Commit 0beac0b5 authored by Daniel Goerz's avatar Daniel Goerz Committed by Christian Kuhn
Browse files

[BUGFIX] Initialize strictly typed property setCookie with null

Releases: master
Resolves: #93069
Relates: #93011
Change-Id: I80c970009694462d48ec65f96eb9b0f29cacf18c
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/67108

Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent b2a22815
...@@ -212,7 +212,7 @@ abstract class AbstractUserAuthentication implements LoggerAwareInterface ...@@ -212,7 +212,7 @@ abstract class AbstractUserAuthentication implements LoggerAwareInterface
* *
* @var Cookie|null * @var Cookie|null
*/ */
protected ?Cookie $setCookie; protected ?Cookie $setCookie = null;
/** /**
* Initialize some important variables * Initialize some important variables
...@@ -285,7 +285,7 @@ abstract class AbstractUserAuthentication implements LoggerAwareInterface ...@@ -285,7 +285,7 @@ abstract class AbstractUserAuthentication implements LoggerAwareInterface
*/ */
public function appendCookieToResponse(ResponseInterface $response): ResponseInterface public function appendCookieToResponse(ResponseInterface $response): ResponseInterface
{ {
if (isset($this->setCookie)) { if ($this->setCookie !== null) {
$response = $response->withAddedHeader('Set-Cookie', $this->setCookie->__toString()); $response = $response->withAddedHeader('Set-Cookie', $this->setCookie->__toString());
} }
return $response; return $response;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment