From b942bc0536903e580bd6d5cce8d2b3155223d20b Mon Sep 17 00:00:00 2001 From: Christian Kuhn <lolli@schwarzbu.ch> Date: Thu, 26 Oct 2023 17:32:02 +0200 Subject: [PATCH] [BUGFIX] Array access warning in DataHandler 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> --- typo3/sysext/core/Classes/DataHandling/DataHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typo3/sysext/core/Classes/DataHandling/DataHandler.php b/typo3/sysext/core/Classes/DataHandling/DataHandler.php index 5d7922f6253e..a7e01d8af8a2 100644 --- a/typo3/sysext/core/Classes/DataHandling/DataHandler.php +++ b/typo3/sysext/core/Classes/DataHandling/DataHandler.php @@ -3756,7 +3756,7 @@ class DataHandler implements LoggerAwareInterface $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; } -- GitLab