[BUGFIX] Fix PHP warning with date function in FormEngine 29/33129/13
authorWouter Wolters <typo3@wouterwolters.nl>
Fri, 24 Oct 2014 09:49:50 +0000 (11:49 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Fri, 31 Oct 2014 09:00:57 +0000 (10:00 +0100)
commit16e2f1d172da04fe45597e857fe49c5644baf744
treec556ea0e23cfa6b245c675b25e04531c1d9b0897
parentf452e91e67938052d4edfd0f381dda44d99a0c3a
[BUGFIX] Fix PHP warning with date function in FormEngine

The timestamp handed to the date function must be of type int
otherwise a warning is issued. Cast the value to int before
passing it to the date function. The important scenarios are
when the timestamp is "0" or "" (blank string).

Add unit test for formatValue function and the possible format
configurations.

Resolves: #62032
Releases: master, 6.2, 6.1, 4.5
Change-Id: I5207ef5b562dd70b9b5e574eef1b9ee59fa836f0
Reviewed-on: http://review.typo3.org/33129
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Stefan Froemken <froemken@gmail.com>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/backend/Classes/Form/FormEngine.php
typo3/sysext/backend/Tests/Unit/Form/FormEngineTest.php [new file with mode: 0644]