From d0c0d6db439520154960b17c73b7c18b63a3dc5a Mon Sep 17 00:00:00 2001
From: Benjamin Franzke <ben@bnf.dev>
Date: Wed, 11 Sep 2024 10:21:51 +0200
Subject: [PATCH] [BUGFIX] Fix access to undefined array key in settings save
 action

Resolves: #104892
Releases: main
Change-Id: I55ad0f3da6807d2b8bd624a95613f3d612ddc788
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/86004
Reviewed-by: Benjamin Franzke <ben@bnf.dev>
Tested-by: Benjamin Franzke <ben@bnf.dev>
Reviewed-by: Lina Wolf <112@linawolf.de>
Tested-by: Benjamin Kott <benjamin.kott@outlook.com>
Tested-by: core-ci <typo3@b13.com>
Reviewed-by: Benjamin Kott <benjamin.kott@outlook.com>
Tested-by: Lina Wolf <112@linawolf.de>
---
 .../backend/Classes/Controller/SiteSettingsController.php       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/typo3/sysext/backend/Classes/Controller/SiteSettingsController.php b/typo3/sysext/backend/Classes/Controller/SiteSettingsController.php
index 778c1165f003..8027cb6d5719 100644
--- a/typo3/sysext/backend/Classes/Controller/SiteSettingsController.php
+++ b/typo3/sysext/backend/Classes/Controller/SiteSettingsController.php
@@ -179,7 +179,7 @@ readonly class SiteSettingsController
         $parsedBody = $request->getParsedBody();
 
         $returnUrl = GeneralUtility::sanitizeLocalUrl(
-            (string)($parsedBody['returnUrl'])
+            (string)($parsedBody['returnUrl'] ?? '')
         ) ?: null;
         $overviewUrl = $this->uriBuilder->buildUriFromRoute('site_settings');
         $CMD = $parsedBody['CMD'] ?? '';
-- 
GitLab