diff --git a/typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapFactory.php b/typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapFactory.php
index fdab907ab770c0205d066debb6a9911749629353..330b017ade5a6e960867861eab2fedfa9b712f6f 100644
--- a/typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapFactory.php
+++ b/typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapFactory.php
@@ -210,7 +210,7 @@ class DataMapFactory implements SingletonInterface
      */
     protected function getColumnsDefinition(string $tableName): array
     {
-        return is_array($GLOBALS['TCA'][$tableName]['columns']) ? $GLOBALS['TCA'][$tableName]['columns'] : [];
+        return is_array($GLOBALS['TCA'][$tableName]['columns'] ?? null) ? $GLOBALS['TCA'][$tableName]['columns'] : [];
     }
 
     /**
@@ -220,7 +220,10 @@ class DataMapFactory implements SingletonInterface
      */
     protected function addMetaDataColumnNames(DataMap $dataMap, string $tableName): DataMap
     {
-        $controlSection = $GLOBALS['TCA'][$tableName]['ctrl'];
+        $controlSection = $GLOBALS['TCA'][$tableName]['ctrl'] ?? null;
+        if ($controlSection === null) {
+            return $dataMap;
+        }
         $dataMap->setPageIdColumnName('pid');
         if (isset($controlSection['tstamp'])) {
             $dataMap->setModificationDateColumnName($controlSection['tstamp']);