Review main Merged

54577[BUGFIX] EXT:form - Cover empty strings for "skipIfValueIsEmpty"

Andreas Kienast CR +2 V +2 Normal +59 −1 updated 12/07/17, 19:58

Commit message

This ensures that e.g. unchecked checkboxes are not tried to be
stored in the database as empty strings causing an error on int
fields.

Review

  • Code review CR +2
    • Susi Moog +2
    • Daniel Gohlke +1
  • Verified V +2
    • Susi Moog +2
    • Daniel Gohlke +1
    • TYPO3com +1 CI

Issues 1

Files 2

Review log 2024

  1. Andreas Kienast uploaded patch set 1 11/07/17, 10:48

  2. TYPO3com voted on patch set 1 V +1 11/07/17, 10:57 Completed build in 09m 06s on Tue, 7 Nov, 11:57 AM Test Summary: 56786 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-16147

  3. Mathias Brodala commented on patch set 1 11/07/17, 11:04

    SaveToDatabaseFinisher.php:222

    Just asking to be sure: why not "empty($elementValue)" by now?
  4. Andreas Kienast commented on patch set 1 11/07/17, 11:06

    SaveToDatabaseFinisher.php:222 Reply

    This would affect 0 as well, for example. I'm totally fine with changing that, but I'm not sure whether this is intended.
  5. Susi Moog commented on patch set 1 11/14/17, 14:53

    SaveToDatabaseFinisher.php:222 Reply

    So, to get it right: null, false, '' will become NULL in the database (if the field allows it) 0 will be 0 in the database now -- I'm a bit unsure about the change, as the checkbox example with an integer field works fine with it, but what about an empty string given to a NOT NULL char field? won't that fail now?
  6. Andreas Kienast commented on patch set 1 11/14/17, 15:00

    SaveToDatabaseFinisher.php:222 Reply

    Yeah, you're right. I'd say, in such case drop "skipIfValueIsEmpty", then there is still an empty string sent to the database. Please correct me if I'm wrong here. Does this qualify as a breaking change, even when the "wrong" setting was used (whose handling is fixed)?
  7. Susi Moog commented on patch set 1 11/14/17, 15:07

    SaveToDatabaseFinisher.php:222 Reply

    hmm hmm.. I just looked at the documentation for that setting and I'd say, no it's not breaking - but maybe we should clarify the meaning of empty in the docs (as 0 would be empty in developer context, but is not really empty if someone actively enters it in a field).
  8. Susi Moog voted on patch set 1 CR +1 11/14/17, 15:26

  9. Daniel Gohlke voted on patch set 1 CR +1 11/24/17, 09:13

  10. Tobi Kretschmann voted on patch set 1 CR +1 12/04/17, 10:07

  11. Susi Moog voted on patch set 1 V +1 12/06/17, 18:51

  12. Mathias Brodala uploaded patch set 2 12/07/17, 14:41

  13. TYPO3com voted on patch set 2 V +1 12/07/17, 14:52 Completed build in 11m 05s on Thu, 7 Dec, 03:52 PM Test Summary: 57075 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17334

  14. Mathias Brodala uploaded patch set 3 12/07/17, 15:12

  15. Mathias Brodala commented on patch set 3 12/07/17, 15:16

    I've dropped the boolean false check since I don't think it is possible to have such values here. If it is possible, please provide steps how to achieve this.
  16. TYPO3com voted on patch set 3 V +1 12/07/17, 15:27 Completed build in 15m 09s on Thu, 7 Dec, 04:27 PM Test Summary: 57075 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17343

  17. Daniel Gohlke voted on patch set 3 CR +1 V +1 12/07/17, 15:37

  18. Daniel Gohlke uploaded patch set 4 12/07/17, 16:46

  19. Daniel Gohlke commented on patch set 4 12/07/17, 16:53

    Documentation is only needed for 8.7 because we write the new documentation in a different repository. A follow up for documentation in 8.7 is needed. Use both rst-files from patchset 3.
  20. TYPO3com voted on patch set 4 V +1 12/07/17, 16:56 Completed build in 10m 01s on Thu, 7 Dec, 05:56 PM Test Summary: 57075 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17353

  21. Daniel Gohlke voted on patch set 4 CR +1 V +1 12/07/17, 17:19

  22. Susi Moog voted on patch set 4 CR +2 V +2 12/07/17, 19:58

  23. Gerrit merged patch set 4 12/07/17, 19:58

  24. Susi Moog commented on patch set 5 12/07/17, 19:58

    Cherry Picked This patchset was cherry picked to branch TYPO3_8-7 as commit a1a997330b101cc148005e13c6a3ec46660e8402