#71681PHP Warning: Invalid argument supplied for foreach() on flexform processing
Description
The problem occurs only with not so clean flexform. But that can happen and shouldn’t break the backend.
/typo3/sysext/backend/Classes/Form/FormDataProvider/EvaluateDisplayConditions.php:
00169: $flatFlexFormRowData = [];
00170: foreach ($flexFormRowData as $sheetName => $sheetConfiguration) {
00171: foreach ($sheetConfiguration['lDEF'] as $fieldName => $fieldConfiguration) {
00172: $flatFlexFormRowData[$sheetName . '.' . $fieldName] = $fieldConfiguration;
00173: }
In my opinion it is enough to cast to array:
foreach ((array)$flexFormRowData
foreach ((array)$sheetConfiguration[‘lDEF’]
This will not heal the flexform and no error message will be shown but an editor can’t solve the problem anyway.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.