Bug #71681
closedPHP Warning: Invalid argument supplied for foreach() on flexform processing
0%
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.
Updated by Torben Hansen almost 9 years ago
I faced this problem today and agree, that this problem should'nt break the beackend
Updated by Morton Jonuschat almost 9 years ago
- Status changed from New to Needs Feedback
Could one of you please provide an example Flexform that reproduces this bug? I don't think that this is the right place to fix it nor is it a good idea to silently skip over invalid data, but I'd like to investigate further.
Updated by Torben Hansen almost 9 years ago
In my case it was a problem with a misconfigured FLUIDTYPO3 template, that did save wrong Flexform to the database. I fixed it manually after the error appeared. Sadly, I could not reproduce the problem any more to provide example Flexform.
Updated by Morton Jonuschat over 8 years ago
- Status changed from Needs Feedback to Closed
No feedback within the last 90 days => closing this issue.
If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.