[BUGFIX] Remove second registration of argument 'placeholder'
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Thu, 16 May 2013 10:37:53 +0000 (12:37 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Fri, 17 May 2013 16:31:07 +0000 (18:31 +0200)
Feature #45960 introduced a second registration of the placeholder
argument, causing the Extension Manager 'Get Extensions' function
to throw an exception. The same is true for all extensions using the
textfield viewhelper.

This patch removes the second registration in the render function
parameters list to use the same method in all viewhelpers.

Resolves: #48250
Related: #45960
Releases: 6.2
Change-Id: I25c6c1510c7a38a4a1946205189f0b65a3f4ffe1
Reviewed-on: https://review.typo3.org/20824
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/fluid/Classes/ViewHelpers/Form/TextfieldViewHelper.php

index 4a645a2..2d2a374 100644 (file)
@@ -54,11 +54,10 @@ class TextfieldViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractForm
         *
         * @param boolean $required If the field is required or not
         * @param string $type The field type, e.g. "text", "email", "url" etc.
-        * @param string $placeholder A string used as a placeholder for the value to enter
         * @return string
         * @api
         */
-       public function render($required = NULL, $type = 'text', $placeholder = NULL) {
+       public function render($required = NULL, $type = 'text') {
                $name = $this->getName();
                $this->registerFieldNameForFormTokenGeneration($name);
 
@@ -67,10 +66,6 @@ class TextfieldViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractForm
 
                $value = $this->getValue();
 
-               if ($placeholder !== NULL) {
-                       $this->tag->addAttribute('placeholder', $placeholder);
-               }
-
                if ($value !== NULL) {
                        $this->tag->addAttribute('value', $value);
                }