[BUGFIX] FormFieldVH->getPropertyValue() must work without form object
[Packages/TYPO3.CMS.git] / typo3 / sysext / fluid / Classes / ViewHelpers / Form / AbstractFormFieldViewHelper.php
index 7a21192..a641b3c 100644 (file)
@@ -177,6 +177,9 @@ abstract class AbstractFormFieldViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\
         * @return mixed Value
         */
        protected function getPropertyValue() {
+               if (!$this->viewHelperVariableContainer->exists('TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper', 'formObject')) {
+                       return NULL;
+               }
                $formObject = $this->viewHelperVariableContainer->get('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObject');
                $propertyName = $this->arguments['property'];
                if (is_array($formObject)) {