Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Resolve undefined array key warning in FlexFormProcessor #648

Closed

Conversation

christophlehmann
Copy link
Contributor

Exception message was

PHP Warning: Undefined array key "pi_flexform" in /.../typo3/typo3/typo3conf/ext/headless/Classes/DataProcessing/FlexFormProcessor.php line 102

Exception message was

PHP Warning: Undefined array key "pi_flexform" in /.../typo3/typo3/typo3conf/ext/headless/Classes/DataProcessing/FlexFormProcessor.php line 102
@coveralls
Copy link

Pull Request Test Coverage Report for Build 6174603438

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 62.756%

Totals Coverage Status
Change from base Build 6173629096: 0.0%
Covered Lines: 797
Relevant Lines: 1270

💛 - Coveralls

if (!$processedData['data'][$fieldName] && !$processedData[$fieldName]) {
// processing the flexform data
$originalValue = $processedData['data'][$fieldName] ?? $processedData[$fieldName] ?? null;
if ($originalValue === null) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could add checks for empty string and array, so we can early return and !empty later on will be redundant

@lukaszuznanski
Copy link
Collaborator

@christophlehmann there are changes requested and conflicts to resolve, are you willing to pick this PR?

@twoldanski twoldanski closed this Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants