Skip to content

Commit

Permalink
[BUGFIX] Avoid undefined array key access in DataHandler
Browse files Browse the repository at this point in the history
Resolves: #99725
Releases: main, 12.4, 11.5
Change-Id: I4682cbe57b4908e13c219c5be4b0810c0d348bf1
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80413
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: core-ci <typo3@b13.com>
  • Loading branch information
gordon81 authored and lolli42 committed Aug 5, 2023
1 parent d01a03b commit 53b0b81
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions typo3/sysext/core/Classes/DataHandling/DataHandler.php
Expand Up @@ -4056,13 +4056,15 @@ protected function copy_remapTranslationSourceField($table, $l10nRecords, $langu
$updateFields = [
$translationSourceFieldName => $newFieldValue,
];
GeneralUtility::makeInstance(ConnectionPool::class)
->getConnectionForTable($table)
->update($table, $updateFields, ['uid' => (int)$languageSourceMap[$record['uid']]]);
if ($this->BE_USER->workspace > 0) {
if (isset($languageSourceMap[$record['uid']])) {
GeneralUtility::makeInstance(ConnectionPool::class)
->getConnectionForTable($table)
->update($table, $updateFields, ['t3ver_oid' => (int)$languageSourceMap[$record['uid']], 't3ver_wsid' => $this->BE_USER->workspace]);
->update($table, $updateFields, ['uid' => (int)$languageSourceMap[$record['uid']]]);
if ($this->BE_USER->workspace > 0) {
GeneralUtility::makeInstance(ConnectionPool::class)
->getConnectionForTable($table)
->update($table, $updateFields, ['t3ver_oid' => (int)$languageSourceMap[$record['uid']], 't3ver_wsid' => $this->BE_USER->workspace]);
}
}
}
}
Expand Down

0 comments on commit 53b0b81

Please sign in to comment.