Actions
Bug #71681
closedPHP Warning: Invalid argument supplied for foreach() on flexform processing
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2015-11-19
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:
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.
Actions