Project

General

Profile

Actions

Bug #83322

closed

AbstractNode::mergeChildReturnIntoExistingResult does not check empty fields before using foreach

Added by Wolfgang Klinger almost 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2017-12-14
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:

Description

foreach ($childReturn['additionalJavaScriptPost'] as $value) {
            $existing['additionalJavaScriptPost'][] = $value;
}

… (4 occurrences)

so any custom Node has to return an array with all these elements even if not using them.

    public function render()
    {
        // all these fields are required
        $result = [
            'html' => 'Hello world!',

            'additionalJavaScriptPost' => [],
            'additionalJavaScriptSubmit' => [],
            'additionalHiddenFields' => [],
            'stylesheetFiles' => []
        ];

        return $result;
    }
Actions

Also available in: Atom PDF