diff --git a/typo3/sysext/core/Classes/Service/FlexFormService.php b/typo3/sysext/core/Classes/Service/FlexFormService.php
index f1e800641ac252b5a9e55e9256056703b6c73b78..40b5e4a83b72937766f8406abc9836c283a9feb6 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) {