From d3f424a272fb8505e69d8dee3dff4174c53eb9c5 Mon Sep 17 00:00:00 2001
From: Georg Ringer <georg.ringer@gmail.com>
Date: Mon, 12 Dec 2022 15:49:24 +0100
Subject: [PATCH] [BUGFIX] Avoid notices while retrieving the cookie domain
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Resolves: #99337
Releases: main, 11.5
Change-Id: Ia51d0328fc4abc19686375fd47770ead31eac53c
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78060
Tested-by: core-ci <typo3@b13.com>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
Tested-by: Stefan Bürk <stefan@buerk.tech>
---
 .../core/Classes/Authentication/AbstractUserAuthentication.php  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php b/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php
index 960c750379a4..b392f436b97e 100644
--- a/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php
+++ b/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php
@@ -352,7 +352,7 @@ abstract class AbstractUserAuthentication implements LoggerAwareInterface
     protected function getCookieDomain()
     {
         $result = '';
-        $cookieDomain = $GLOBALS['TYPO3_CONF_VARS']['SYS']['cookieDomain'];
+        $cookieDomain = $GLOBALS['TYPO3_CONF_VARS']['SYS']['cookieDomain'] ?? '';
         // If a specific cookie domain is defined for a given application type, use that domain
         if (!empty($GLOBALS['TYPO3_CONF_VARS'][$this->loginType]['cookieDomain'])) {
             $cookieDomain = $GLOBALS['TYPO3_CONF_VARS'][$this->loginType]['cookieDomain'];
-- 
GitLab