Project

General

Profile

Actions

Bug #66533

closed

Paths not possible if array used as form object

Added by Philipp Wrann about 9 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
Start date:
2015-04-22
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.5
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

AbsractFormFieldViewHelper: line 191 (TYPO3 7.1)

protected function getPropertyValue() {
if (!$this->viewHelperVariableContainer->exists(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObject')) {
return NULL;
}
$formObject = $this->viewHelperVariableContainer->get(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObject');
$propertyName = $this->arguments['property'];
if (is_array($formObject)) {
return isset($formObject[$propertyName]) ? $formObject[$propertyName] : NULL;
}
return ObjectAccess::getPropertyPath($formObject, $propertyName);
}

It is not possible to use an array as filter-object in an f:form context with a little bit more complex structures.
I have a 2-dimensional multiple select and want to use an array as filter object but fluid cant determine the value because only one level is checked to retreive the selected value (see above)

If you simple delete the if condition it works, the ObjectAccess::getPropertyPath Utilityfunction is able to work with multi-dimensional arrays, so for what doing this check? It only limits the possibilities.

I think i reported the same isse some time past, so maybe this exists in the fluid package itself and got backported again? But i dont know for sure...

Actions

Also available in: Atom PDF