From 844fb1321f3525b167bbc4a48ce86607a408bfc9 Mon Sep 17 00:00:00 2001
From: Sybille Peters <sypets@gmx.de>
Date: Wed, 8 Feb 2023 18:11:52 +0100
Subject: [PATCH] [BUGFIX] Check for array key in FlexFormService

Resolves: #99846
Releases: main, 11.5
Change-Id: Ie635412ce817f537c34143aac493e4038e3b9afc
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77755
Tested-by: core-ci <typo3@b13.com>
Reviewed-by: Oliver Bartsch <bo@cedev.de>
Tested-by: Oliver Bartsch <bo@cedev.de>
---
 typo3/sysext/core/Classes/Service/FlexFormService.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/typo3/sysext/core/Classes/Service/FlexFormService.php b/typo3/sysext/core/Classes/Service/FlexFormService.php
index f1e800641ac2..40b5e4a83b72 100644
--- a/typo3/sysext/core/Classes/Service/FlexFormService.php
+++ b/typo3/sysext/core/Classes/Service/FlexFormService.php
@@ -41,7 +41,7 @@ class FlexFormService implements SingletonInterface
         $flexFormArray = GeneralUtility::xml2array($flexFormContent);
         $flexFormArray = $flexFormArray['data'] ?? [];
         foreach (array_values($flexFormArray) as $languages) {
-            if (!is_array($languages[$languagePointer])) {
+            if (!is_array($languages[$languagePointer] ?? false)) {
                 continue;
             }
             foreach ($languages[$languagePointer] as $valueKey => $valueDefinition) {
-- 
GitLab