diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php index 977d7819da48..981caa871ce9 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php @@ -118,17 +118,17 @@ protected function getNameWithoutPrefix() 'formObjectName' ); if (!empty($formObjectName)) { - $propertySegments = explode('.', $this->arguments['property']); + $propertySegments = explode('.', $this->arguments['property'] ?? ''); $propertyPath = ''; foreach ($propertySegments as $segment) { $propertyPath .= '[' . $segment . ']'; } $name = $formObjectName . $propertyPath; } else { - $name = $this->arguments['property']; + $name = $this->arguments['property'] ?? ''; } } else { - $name = $this->arguments['name']; + $name = $this->arguments['name'] ?? ''; } if ($this->hasArgument('value') && is_object($this->arguments['value'])) { // @todo Use $this->persistenceManager->isNewObject() once it is implemented diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Form/TextfieldViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Form/TextfieldViewHelper.php index 6bf35c23ee16..005664fc1f42 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Form/TextfieldViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Form/TextfieldViewHelper.php @@ -65,8 +65,8 @@ public function initializeArguments() */ public function render() { - $required = $this->arguments['required']; - $type = $this->arguments['type']; + $required = $this->arguments['required'] ?? false; + $type = $this->arguments['type'] ?? null; $name = $this->getName(); $this->registerFieldNameForFormTokenGeneration($name); diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/TextfieldViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/TextfieldViewHelperTest.php index bdc7e0b5ad7a..1a8d090a3547 100644 --- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/TextfieldViewHelperTest.php +++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/TextfieldViewHelperTest.php @@ -1,4 +1,5 @@