[!!!][BUGFIX] Cast negative int to boolean (true) in BooleanNode 84/26784/9
authorAlexander Schnitzler <alex.schnitzler@typovision.de>
Mon, 13 Jan 2014 13:52:56 +0000 (14:52 +0100)
committerNicole Cordes <typo3@cordes.co>
Sat, 22 Mar 2014 01:19:59 +0000 (02:19 +0100)
Currently Fluid treats negative integers as false which
results in <f:if condition="-9"> rendering else instead
of then.

When casting integers to boolean using php all integers
other than 0 (zero) are casted to true, just 0 results in
false. Therefore, casting of BooleanNode::convertToBoolean
must be adjusted to act like plain php.

This bugfix is a breaking change as people might have
deliberately used the wrong behaviour.

Releases: 6.2
Resolves: #54243
Resolves: #33597
Change-Id: Iebaa578cf071909610ca0e1abfc9bfaad7459231
Reviewed-on: https://review.typo3.org/26784
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
Reviewed-by: Stefan Neufeind
Reviewed-by: Nicole Cordes
Tested-by: Nicole Cordes

No differences found