[BUGFIX] Fix incorrect usage of nested ternary 91/42891/4
authorMarkus Klein <markus.klein@typo3.org>
Thu, 27 Aug 2015 16:09:53 +0000 (18:09 +0200)
committerAlexander Opitz <opitz.alexander@googlemail.com>
Fri, 4 Sep 2015 08:12:25 +0000 (10:12 +0200)
commit565c38c0ede18f8af6cdf2e5b86f8b364c123924
treee98dc7b0fc365ec809333ed0c9bebbb3fe731434
parentff54e69034013f7e5761ac9d526d76cc08b36f5d
[BUGFIX] Fix incorrect usage of nested ternary

Ternaries are left associative in PHP, hence
$a ?: $b ?: $c  ===  ($a ?: $b) ?: $c  !==  $a ?: ($b ?: $c)

Mostly the latter case is used, hence we need parenthesis.

regex used to find occurrences:
^.+?[\s\n]+\?[^\:]*:[\s\n]+.+?[\s\n]+\?.+;$

Resolves: #69368
Releases: master, 6.2
Change-Id: I6235213cd921e7edfe0f4a3e96bde88ebdce3c99
Reviewed-on: http://review.typo3.org/42891
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Stephan GroƟberndt <stephan@grossberndt.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Alexander Opitz <opitz.alexander@googlemail.com>
Tested-by: Alexander Opitz <opitz.alexander@googlemail.com>
typo3/sysext/core/Classes/Controller/FileDumpController.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/frontend/Classes/Controller/ExtDirectEidController.php
typo3/sysext/frontend/Classes/Http/EidRequestHandler.php