Skip to content

Commit

Permalink
[BUGFIX] Avoid PHP array access error in workspaces
Browse files Browse the repository at this point in the history
When a page with a content element that has images
assigned is copied in workspaces, a PHP array access
error is raised since sys_file_reference TCA has
no sortby ctrl.

Add an appropriate null fallback.

Resolves: #102231
Releases: main, 12.4, 11.5
Change-Id: I453a612a62a359156c8be2e087d1d121f1b9c3ea
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81467
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: core-ci <typo3@b13.com>
  • Loading branch information
lolli42 committed Oct 23, 2023
1 parent 5023fe9 commit 2642fae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion typo3/sysext/core/Classes/DataHandling/DataHandler.php
Expand Up @@ -3531,7 +3531,7 @@ public function copySpecificPage($uid, $destPid, $copyTablesArray, $first = fals
$this->resolveVersionedRecords(
$table,
implode(',', $fields),
$GLOBALS['TCA'][$table]['ctrl']['sortby'],
$GLOBALS['TCA'][$table]['ctrl']['sortby'] ?? '',
array_keys($rows)
),
true
Expand Down

0 comments on commit 2642fae

Please sign in to comment.