Bug #94140 » BUGFIX_typo3_10_4_17_extbase_forge_typo3_issue_94140.patch

Patch for 10.4.17 - Heiko Fischer, 2021-07-08 10:46

View differences:

Classes/Persistence/Generic/Storage/Typo3DbBackend.php (revision 7c883b2e9e904ee573b906b74fffadbab22b2645) → Classes/Persistence/Generic/Storage/Typo3DbBackend.php (date 1625740457641)
609 609
        // record to find out all possible fields in this database table
610 610
        $fieldsOfMainTable = $pageRepository->getRawRecord($tableName, $rows[0]['uid']);
611 611
        $overlaidRows = [];
612
        foreach ($rows as $row) {
613
            $mainRow = array_intersect_key($row, $fieldsOfMainTable);
614
            $joinRow = array_diff_key($row, $mainRow);
615
            $mainRow = $this->overlayLanguageAndWorkspaceForSingleRecord($tableName, $mainRow, $pageRepository, $query);
616
            if ($mainRow !== null && is_array($mainRow)) {
617
                $overlaidRows[] = array_replace($joinRow, $mainRow);
612

  
613
        if ($fieldsOfMainTable !== 0) {
614
            foreach ($rows as $row) {
615
                $mainRow = array_intersect_key($row, $fieldsOfMainTable);
616
                $joinRow = array_diff_key($row, $mainRow);
617
                $mainRow = $this->overlayLanguageAndWorkspaceForSingleRecord($tableName, $mainRow, $pageRepository, $query);
618
                if ($mainRow !== null && is_array($mainRow)) {
619
                    $overlaidRows[] = array_replace($joinRow, $mainRow);
620
                }
618 621
            }
619 622
        }
623

  
620 624
        return $overlaidRows;
621 625
    }
622 626

  
(2-2/2)