Bug #76202
openException when accessing empty ObjectStorage property (frontend form submitting)
0%
Description
hi,
seems bug from 6.2 version https://forge.typo3.org/issues/62553 is still in typo3 7.6 version. i have a form where following select field is:
<f:form.select property="anfragen.0.bundesland." id="bundesland" options="{xxxx}" optionValueField="uid" optionLabelField="bundesland" prependOptionLabel="alle Bundesländer" prependOptionValue=""/>
if i submit form and do not select any "bundesland" following error is shown:
#1297759968: Exception while property mapping at property path "anfragen.0.bundesland": PHP Warning: spl_object_hash() expects parameter 1 to be object, null given in /home/kundenhost/public_html/xxx/typo3/sysext/extbase/Classes/Persistence/ObjectStorage.php line 155
here some info from exeption:
#1297759968: Exception while property mapping at property path "anfragen.0.bundesland": PHP Warning: spl_object_hash() expects parameter 1 to be object, null given in /home/kundenhost/public_html/xxxxxs/typo3/sysext/extbase/Classes/Persistence/ObjectStorage.php line 155 (More information)
TYPO3\CMS\Extbase\Property\Exception thrown in file
/home/kundenhost/public_html/xxxxxs/typo3/sysext/extbase/Classes/Property/PropertyMapper.php in line 128.
21 TYPO3\CMS\Extbase\Property\PropertyMapper::convert(array, "Xxxxxx\Mwxxxxxs\Domain\Model\aaaaaaa", TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfiguration)
/home/kundenhost/public_html/xxxxxs/typo3/sysext/extbase/Classes/Mvc/Controller/Argument.php:
00268: }
00269: try {
00270: $this->value = $this->propertyMapper->convert($rawValue, $this->dataType, $this->propertyMappingConfiguration);
00271: } catch (TargetNotFoundException $e) {
00272: // for optional arguments no exeption is thrown.
20 TYPO3\CMS\Extbase\Mvc\Controller\Argument::setValue(array)
/home/kundenhost/public_html/xxxxxs/typo3/sysext/extbase/Classes/Mvc/Controller/AbstractController.php:
00426: $argumentName = $argument->getName();
00427: if ($this->request->hasArgument($argumentName)) {
00428: $argument->setValue($this->request->getArgument($argumentName));
00429: } elseif ($argument->isRequired()) {
00430: throw new \TYPO3\CMS\Extbase\Mvc\Controller\Exception\RequiredArgumentMissingException('Required argument "' . $argumentName . '" is not set for ' . $this->request->getControllerObjectName() . '->' . $this->request->getControllerActionName() . '.', 1298012500);
19 TYPO3\CMS\Extbase\Mvc\Controller\AbstractController::mapRequestArgumentsToControllerArguments()
/home/kundenhost/public_html/xxxxxs/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php:
00168: call_user_func(array($this, $actionInitializationMethodName));
00169: }
00170: $this->mapRequestArgumentsToControllerArguments();
00171: $this->controllerContext = $this->buildControllerContext();
00172: $this->view = $this->resolveView();