[BUGFIX] Fix PHP warning with date function in FormEngine 65/33665/2
authorOliver Hader <oliver@typo3.org>
Fri, 31 Oct 2014 09:51:19 +0000 (10:51 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Thu, 13 Nov 2014 12:34:33 +0000 (13:34 +0100)
commit152b14b205e6b6df4b8ab0e15cd82c52f46cca6a
tree708aed2e5a1a2f7a7e7db53933cbe9e15b7147c9
parent79ba88207e0361c3b496913855c33cc55f633547
[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/33665
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
t3lib/class.t3lib_tceforms.php
tests/t3lib/t3lib_tceformsTest.php [new file with mode: 0644]