Review main Merged

22542[TASK] Use real boolean value for trimExplode third param

Wouter Wolters CR +2 V +2 Hard +251 −251 updated 07/26/13, 10:14

Commit message

Make use of boolean value TRUE as third parameter in
trimExplode function.

Review

  • Code review CR +2
    • Stefan Neufeind +2
    • Markus Klein +1
  • Verified V +2
    • Stefan Neufeind +2
    • Markus Klein +1

Issues 1

Files 66

Show 46 more files

Review log 12

  1. Mr. Jenkins commented on patch set 1 07/24/13, 17:14

  2. Markus Klein commented on patch set 1 V +1 CR +1 07/24/13, 17:32

    DataHandler.php:1260

    Remove namespace here too

    DataHandler.php:2943

    Namespace
  3. Markus Klein uploaded patch set 2 07/24/13, 17:36

  4. Markus Klein voted on patch set 2 V +1 CR +1 07/24/13, 17:37

  5. Mr. Jenkins commented on patch set 2 07/24/13, 17:38

  6. Stefan Neufeind commented on patch set 2 CR -1 07/25/13, 20:56

    In general a great idea. +1 But imho we should leave out cases where a certain elements are used. For example when you have a trimExplode() on a colon-separated string and feed that to list($a, $b) you expect the first two elements to be in there. And if you submitted value 'abc::def' you'll expect $b to be empty!
  7. Markus Klein commented on patch set 2 07/25/13, 23:35

    @Stefan: I just don't understand your comment. Could you explain it for me once again please. ;-)
  8. Stefan Neufeind commented on patch set 2 07/25/13, 23:44

    @Markus: When you have something like list($place, $menuEntry) = GeneralUtility::trimExplode(':', $pos, TRUE); That takes the first and second argument into variables. If you now use "TRUE" here as well, as the patch does in some places, the input-values "abc::def" will make a difference - because until now $menuEntry was empty (in this certain example) - and I guess that's what people will expect if they (might) intentionally write two separation-characters. Imho the cases you want to prevent by adding TRUE are just lists of elements like "abc,def,ghi" where one element might be empty (more precise: equal to '' after trimming) and should be left out.
  9. Markus Klein commented on patch set 2 07/26/13, 00:01

    In which file do we have such a change? I saw only straight replacements of 1 <==> TRUE
  10. Stefan Neufeind commented on patch set 2 CR +1 07/26/13, 00:48

    @Markus: You were right. Was too late already.
  11. Stefan Neufeind voted on patch set 2 V +2 CR +2 07/26/13, 10:14

  12. Stefan Neufeind merged patch set 3 07/26/13, 10:14