Review main Merged

62087[BUGFIX] Properly display boolean values as "0" and "1" in strings

Kay Strobach CR +2 V +2 Easy +7 −6 updated 03/23/20, 15:02

Commit message

The previous implementation used two typecasts in a row: from bool
to string, and from string to bool again. This caused a boolean
false to be cast first to null and then to an empty string instead
of to "0".

Review

  • Code review CR +2 Done
    • Daniel Goerz +2
    • Stefan Froemken +1
  • Verified V +2 Done
    • Daniel Goerz +2
    • Stefan Froemken +1
    • TYPO3com +1 CI

Issues 1

Files 1

Review log 4056

Show 2031 earlier messages
  1. Kay Strobach uploaded patch set 1 10/23/19, 19:01

  2. Kay Strobach wrote 10/23/19, 19:02

    Topic set to FAL
  3. TYPO3com voted on patch set 1 V -1 10/23/19, 19:11 Completed build in 09m 50s on Wed, 23 Oct, 07:11 PM Test Summary: 48016 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37540

  4. TYPO3com voted on patch set 1 V +1 10/23/19, 20:37 Completed build in 1h 45m 58s on Wed, 23 Oct, 08:37 PM Test Summary: 48017 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37540

  5. Jörg Bösche commented on patch set 1 V +1 CR +1 10/24/19, 06:44

    verified on master and the patch set works fine for me. Could not reproduce the behavior on v9.5.9 with PHP7.2 and SQL non_stricted mode. - But we should fix it in 9.5 also. ;-)
  6. Oli Bartsch commented on patch set 1 CR -1 10/24/19, 07:25

    Please add a proper commit message describing the bugfix and not just the initial behaviour. And please start your commit message with uppercase char.
  7. Kay Strobach updated the commit message in patch set 2 10/24/19, 07:39

  8. TYPO3com voted on patch set 2 V -1 10/24/19, 07:48 Completed build in 09m 46s on Thu, 24 Oct, 07:48 AM Test Summary: 1 of 38265 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37554

  9. TYPO3com voted on patch set 2 V +1 10/24/19, 08:09 Completed build in 40m 08s on Thu, 24 Oct, 08:09 AM Test Summary: 48017 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37554

  10. Kay Strobach updated the commit message in patch set 3 10/25/19, 08:54

  11. Anja Leichsenring updated the commit message in patch set 4 10/25/19, 08:57

  12. TYPO3com voted on patch set 3 V -1 10/25/19, 09:07 Completed build in 13m 08s on Fri, 25 Oct, 09:07 AM Test Summary: 1 of 48376 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37641

  13. TYPO3com voted on patch set 4 V -1 10/25/19, 09:16 Completed build in 16m 14s on Fri, 25 Oct, 09:16 AM Test Summary: 1 of 48376 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37642

  14. TYPO3com voted on patch set 4 V +1 10/25/19, 09:46 Completed build in 1h 02m 05s on Fri, 25 Oct, 09:46 AM Test Summary: 48017 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37642

  15. Mathias Brodala commented on patch set 4 10/25/19, 14:05

    UserSysFileStorageIsPublicElement.php:112

    How about this instead: (int)$isPublic The string concatenation around will trigger an implicit string cast then.
  16. Kay Strobach commented on patch set 4 10/25/19, 14:07

    UserSysFileStorageIsPublicElement.php:112 Reply

    the just wanted to write it explizit. as a cast to string is likely to break, because string(0) is casted to "" which is acutally the old behaviour.
  17. Mathias Brodala commented on patch set 4 10/25/19, 14:25

    UserSysFileStorageIsPublicElement.php:112 Reply

    That's true, thanks for the reminder.
  18. Marcus Schwemer voted on patch set 4 V +1 10/30/19, 20:48

  19. Oli Bartsch voted on patch set 4 CR +1 10/31/19, 06:46

  20. Marcus Schwemer voted on patch set 4 CR +1 10/31/19, 08:14

  21. Tymoteusz Motylewski commented on patch set 4 CR -1 10/31/19, 08:18

    UserSysFileStorageIsPublicElement.php:112 Reply

    Can we move the casting to the place where the variable is defined? This will simplify this line as well as line 108.
  22. Kay Strobach rebased onto patch set 5 11/05/19, 19:38

  23. Kay Strobach uploaded patch set 6 11/05/19, 19:44

  24. Kay Strobach commented on patch set 6 11/05/19, 19:44

    UserSysFileStorageIsPublicElement.php:112 Reply

    done in the latest patchset
  25. TYPO3com voted on patch set 5 V +1 11/05/19, 19:50 Completed build in 11m 13s on Tue, 5 Nov, 07:50 PM Test Summary: 48131 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38021

  26. TYPO3com voted on patch set 6 V +1 11/05/19, 19:54 Completed build in 10m 17s on Tue, 5 Nov, 07:54 PM Test Summary: 48131 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38022

  27. Alexander Schnitzler commented on patch set 6 11/07/19, 13:54

    Unresolved

    That's hard to understand. What about: Properly display boolean values as "0" and "1" in strings
  28. Kay Strobach updated the commit message in patch set 7 11/07/19, 18:50

  29. TYPO3com voted on patch set 7 V -1 11/07/19, 19:01 Completed build in 09m 57s on Thu, 7 Nov, 07:01 PM Test Summary: 252 of 37605 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38084

  30. Kay Strobach commented on patch set 7 11/07/19, 19:55

    > Patch Set 7: Verified-1 > > Completed build in 09m 57s on Thu, 7 Nov, 07:01 PM > Test Summary: 252 of 37605 failed > Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38084 rebuild please
  31. TYPO3com commented on patch set 7 11/08/19, 05:22 Completed build in 11m 28s on Fri, 8 Nov, 05:22 AM Test Summary: 45 of 37612 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38092

  1. TYPO3com commented on patch set 7 11/08/19, 09:57 Completed build in 58m 17s on Fri, 8 Nov, 09:57 AM Test Summary: 43609 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38097

  2. Oliver Klee commented on patch set 7 11/08/19, 11:34

    This does not make sense to me. If the casting is to a string. the result cannot be null.
  3. Kay Strobach commented on patch set 7 11/08/19, 11:54

    Reply

    the casting goes like (bool) -> (string) -> form -> (string) -> (bool) the cast from the last string (empty) instead of `0` goes to NULL
  4. Oliver Klee commented on patch set 7 11/08/19, 12:25

    Reply

    Maybe we can reword (or add more of this explanation to) the commit message to avoid this kind of confusion?
  5. Kay Strobach commented on patch set 7 11/08/19, 12:27

    Reply Unresolved

    what's your suggestion here, maybe you can create a phrase which we can then discuss?
  6. Oliver Klee commented on patch set 7 11/09/19, 14:56

    What about this: The previous implementation used two typecasts in a row: from bool to string, and form string to bool again. This caused a boolean false to be cast first to null and then to an empty string instead of to "1".
  7. Kay Strobach updated the commit message in patch set 8 11/11/19, 07:02

  8. TYPO3com voted on patch set 8 V -1 11/11/19, 07:27 Completed build in 24m 15s on Mon, 11 Nov, 07:27 AM Test Summary: 1 of 48656 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38258

  9. Kay Strobach rebased onto patch set 9 11/11/19, 07:34

  10. TYPO3com voted on patch set 9 V -1 11/11/19, 07:41 Completed build in 07m 38s on Mon, 11 Nov, 07:41 AM Test Summary: 1 of 48372 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38261

  11. TYPO3com voted on patch set 9 V +1 01/18/20, 17:47 Completed build in 09m 53s on Sat, 18 Jan, 05:47 PM Test Summary: 70442 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40073

  12. Benni Mack commented on patch set 9 02/15/20, 07:44

    Kay, is everything resolved here / all comments taken into account?
  13. Kay Strobach commented on patch set 9 02/15/20, 08:16

    I think so
  14. Stefan Froemken commented on patch set 9 V -1 02/15/20, 09:45

    Please, don't merge this patch. Now, the hidden input field is always 1 for a new local filestorage. So, yes, I can deactivate "is public", and it will be stored correctly, but if I open the record and click just save, the "is public" will be activated again what is not expected.
  15. Stefan Froemken commented on patch set 9 02/15/20, 09:47

    UserSysFileStorageIsPublicElement.php:65

    why don't casting this value to string interpreted bool, too?
  16. Kay Strobach commented on patch set 9 02/15/20, 11:57

    Must have gone lost during iteration, will check again
  17. Benni Mack commented on patch set 9 02/27/20, 12:57

    ping
  18. Kay Strobach commented on patch set 9 02/27/20, 14:04

    > Patch Set 9: > > ping now planning it for tomorrow
  19. Daniel Goerz commented on patch set 9 03/23/20, 13:50

    UserSysFileStorageIsPublicElement.php:65 Reply

    Done
  20. Daniel Goerz uploaded patch set 10 03/23/20, 13:51

  21. Daniel Goerz commented on patch set 10 V +1 CR +1 03/23/20, 13:52

    Works for me. @Stefan, did I miss something?
  22. Stefan Froemken voted on patch set 10 V +1 CR +1 03/23/20, 14:03

  23. TYPO3com voted on patch set 10 V +1 03/23/20, 14:03 Completed build in 11m 22s on Mon, 23 Mar, 02:03 PM Test Summary: 72225 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1622

  24. Daniel Goerz voted on patch set 10 V +2 CR +2 03/23/20, 15:01

  25. Daniel Goerz merged patch set 11 03/23/20, 15:02