Review main Merged

42891[BUGFIX] Fix incorrect usage of nested ternary

Markus Klein CR +2 V +2 Easy +4 −4 updated 09/04/15, 10:40

Commit message

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]+\?.+;$

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 4