[BUGFIX] Avoid PHP warnings within DatePickerViewHelper 22/55922/7
authorRalf Zimmermann <ralf.zimmermann@tritum.de>
Tue, 27 Feb 2018 13:47:58 +0000 (14:47 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 28 Feb 2018 09:53:49 +0000 (10:53 +0100)
Avoid PHP warnings within ext:form DatePickerViewHelper if the property
properties.additionalAttributes.placeholder is not defined within
the form definition.

Releases: master, 8.7
Resolves: #84065
Change-Id: I49e0bb3a9548f0be402e1a4794c60c1b42744fac
Reviewed-on: https://review.typo3.org/55922
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Frans Saris <franssaris@gmail.com>
Tested-by: Frans Saris <franssaris@gmail.com>
Reviewed-by: Wolfgang Klinger <wolfgang@wazum.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/form/Classes/ViewHelpers/Form/DatePickerViewHelper.php

index 938b2c8..2a9b3de 100644 (file)
@@ -81,7 +81,7 @@ class DatePickerViewHelper extends AbstractFormFieldViewHelper
         $enableDatePicker = $this->arguments['enableDatePicker'];
         $dateFormat = $this->arguments['dateFormat'];
         $previewMode = (bool)$this->arguments['previewMode'];
-        $placeholder = $this->arguments['placeholder'] ?? $this->arguments['additionalAttributes']['placeholder'];
+        $placeholder = $this->arguments['additionalAttributes']['placeholder'] ?? $this->arguments['placeholder'];
 
         $name = $this->getName();
         $this->registerFieldNameForFormTokenGeneration($name);