Review main Merged

35910[BUGFIX] Properly check TS conditions with key '0'

Christian Futterlieb CR +2 V +2 Easy +14 −1 updated 01/10/15, 21:51

Commit message

Global vars and strings from array expressions with key '0' must be
checked correctly in TS conditions.
E.g. when using [globalVar = GP:myoption|0 = 1] the 0 is now
correctly evaluated.

Review

  • Code review CR +2
    • Markus Klein +2
    • Tymoteusz Motylewski +1
    • Christian Futterlieb +1
  • Verified V +2
    • Markus Klein +2
    • Tymoteusz Motylewski +1

Issues 1

Files 2

Review log 15

  1. Christian Futterlieb uploaded patch set 1 01/08/15, 18:33

  2. Christian Futterlieb commented on patch set 1 01/08/15, 18:37

    Where should the unit test go? I'm not sure, because the tests in sysext frontend seem to group all the condition testing..
  3. Stefan Froemken commented on patch set 1 01/08/15, 18:42

    AbstractConditionMatcher.php:531

    I think it is not necessary to have a binary safe check against an empty value. trim($splitAgain[1]) !== '' should be enough.
  4. Stefan Froemken commented on patch set 1 01/08/15, 18:51

    In frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php you will find some methods starting with "globalVar*". Add a new test there or, if it matches, add a new line to one of the existing tests.
  5. Markus Klein commented on patch set 1 01/08/15, 20:03

    Properly check TS conditions with key '0'
    Please describe what you're changing, not what is not working.

    AbstractConditionMatcher.php:531 Reply

    strcmp is too slow for a simple comparison against ''. Please go for !==
  6. Christian Futterlieb uploaded patch set 2 01/08/15, 22:15

  7. Christian Futterlieb commented on patch set 1 01/08/15, 22:17

    @Stefan: thanks for the advice, I added the unit test. @Markus: I'm sorry, my english is not very good :( please take a look at the commit message now
  8. Christian Futterlieb uploaded patch set 3 01/08/15, 22:19

  9. Markus Klein updated the commit message in patch set 4 01/08/15, 23:58

  10. Markus Klein commented on patch set 4 CR +1 01/08/15, 23:59

    It's not about the language skills, it's just about what we describe. Just extended your message a bit. Thanks
  11. Christian Futterlieb commented on patch set 4 CR +1 01/09/15, 09:26

    > Just extended your message a bit. Thanks :)
  12. Tymoteusz Motylewski voted on patch set 4 CR +1 V +1 01/10/15, 21:05

  13. Markus Klein voted on patch set 4 V +2 CR +2 01/10/15, 21:51

  14. Markus Klein merged patch set 4 01/10/15, 21:51

  15. Markus Klein commented on patch set 5 01/10/15, 21:51

    Cherry Picked This patchset was cherry picked to branch TYPO3_6-2 as commit fee09ee2761456374f864bc3f477087fc8cf21f7