Skip to content

Commit

Permalink
[BUGFIX] Array access warning in DataHandler
Browse files Browse the repository at this point in the history
This may be triggered by invalid FlexForm values
that does not contain a 'data' key for whatever
reason.

Resolves: #100733
Releases: main, 12.4, 11.5
Change-Id: I96924d65af56fd7cf2bb2a97fd4591b3c81f934f
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81586
Tested-by: core-ci <typo3@b13.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
  • Loading branch information
lolli42 committed Oct 26, 2023
1 parent 31921f5 commit b942bc0
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 @@ -3756,7 +3756,7 @@ public function copyRecord_procBasedOnFieldType($table, $uid, $field, $value, $r
$currentValue = is_string($value) ? GeneralUtility::xml2array($value) : null;
// Traversing the XML structure, processing files:
if (is_array($currentValue)) {
$currentValue['data'] = $this->checkValue_flex_procInData($currentValue['data'], [], $dataStructureArray, [$table, $uid, $field, $realDestPid], 'copyRecord_flexFormCallBack', $workspaceOptions);
$currentValue['data'] = $this->checkValue_flex_procInData($currentValue['data'] ?? [], [], $dataStructureArray, [$table, $uid, $field, $realDestPid], 'copyRecord_flexFormCallBack', $workspaceOptions);
// Setting value as an array! -> which means the input will be processed according to the 'flex' type when the new copy is created.
$value = $currentValue;
}
Expand Down

0 comments on commit b942bc0

Please sign in to comment.