[BUGFIX] use $for only when not empty and not NULL
authorPeter Niederlag(office) <netservice@niekom.de>
Wed, 24 Aug 2011 15:52:52 +0000 (17:52 +0200)
committerPeter Niederlag(office) <netservice@niekom.de>
Wed, 7 Sep 2011 12:51:32 +0000 (14:51 +0200)
Dont restrict errors to argument $for
when $for is empty string OR NULL

Change-Id: Ic831aeb3355ce2fdba3bb7bbeec1fe4eb467f48d
Resolves: #29229

typo3/sysext/fluid/Classes/ViewHelpers/Form/ErrorsViewHelper.php

index 2728d9c..761bcc5 100644 (file)
@@ -69,7 +69,7 @@ class Tx_Fluid_ViewHelpers_Form_ErrorsViewHelper extends Tx_Fluid_Core_ViewHelpe
         */
        public function render($for = '', $as = 'error') {
                $errors = $this->controllerContext->getRequest()->getErrors();
-               if ($for !== '') {
+               if ($for !== '' && $for !== NULL) {
                        $propertyPath = explode('.', $for);
                        foreach ($propertyPath as $currentPropertyName) {
                                $errors = $this->getErrorsForProperty($currentPropertyName, $errors);