Index: Classes/Persistence/Generic/Storage/Typo3DbBackend.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/Classes/Persistence/Generic/Storage/Typo3DbBackend.php b/Classes/Persistence/Generic/Storage/Typo3DbBackend.php --- a/Classes/Persistence/Generic/Storage/Typo3DbBackend.php (revision 7c883b2e9e904ee573b906b74fffadbab22b2645) +++ b/Classes/Persistence/Generic/Storage/Typo3DbBackend.php (date 1625740457641) @@ -609,14 +609,18 @@ // record to find out all possible fields in this database table $fieldsOfMainTable = $pageRepository->getRawRecord($tableName, $rows[0]['uid']); $overlaidRows = []; - foreach ($rows as $row) { - $mainRow = array_intersect_key($row, $fieldsOfMainTable); - $joinRow = array_diff_key($row, $mainRow); - $mainRow = $this->overlayLanguageAndWorkspaceForSingleRecord($tableName, $mainRow, $pageRepository, $query); - if ($mainRow !== null && is_array($mainRow)) { - $overlaidRows[] = array_replace($joinRow, $mainRow); + + if ($fieldsOfMainTable !== 0) { + foreach ($rows as $row) { + $mainRow = array_intersect_key($row, $fieldsOfMainTable); + $joinRow = array_diff_key($row, $mainRow); + $mainRow = $this->overlayLanguageAndWorkspaceForSingleRecord($tableName, $mainRow, $pageRepository, $query); + if ($mainRow !== null && is_array($mainRow)) { + $overlaidRows[] = array_replace($joinRow, $mainRow); + } } } + return $overlaidRows; }