Project

General

Profile

Actions

Bug #71681

closed

PHP Warning: Invalid argument supplied for foreach() on flexform processing

Added by René Fritz over 8 years ago. Updated about 8 years ago.

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 #1

Updated by Torben Hansen over 8 years ago

I faced this problem today and agree, that this problem should'nt break the beackend

Actions #2

Updated by Morton Jonuschat over 8 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.

Actions #3

Updated by Torben Hansen over 8 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.

Actions #4

Updated by Morton Jonuschat about 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.

Actions

Also available in: Atom PDF