From 0beac0b51dc3d1c0cff7a29507e0f0dc7869a9a1 Mon Sep 17 00:00:00 2001 From: Daniel Goerz <daniel.goerz@posteo.de> Date: Sun, 13 Dec 2020 12:16:24 +0100 Subject: [PATCH] [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: TYPO3com <noreply@typo3.com> Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> --- .../Classes/Authentication/AbstractUserAuthentication.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php b/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php index fc8419fd8406..d1c4c9379e2b 100644 --- a/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php +++ b/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php @@ -212,7 +212,7 @@ abstract class AbstractUserAuthentication implements LoggerAwareInterface * * @var Cookie|null */ - protected ?Cookie $setCookie; + protected ?Cookie $setCookie = null; /** * Initialize some important variables @@ -285,7 +285,7 @@ abstract class AbstractUserAuthentication implements LoggerAwareInterface */ public function appendCookieToResponse(ResponseInterface $response): ResponseInterface { - if (isset($this->setCookie)) { + if ($this->setCookie !== null) { $response = $response->withAddedHeader('Set-Cookie', $this->setCookie->__toString()); } return $response; -- GitLab