Review main Merged

90429[BUGFIX] Catch PHP warning when FlexForm select items config is empty

Christian Weiske CR +2 V +2 Easy +17 −0 updated 08/18/25, 11:47

Commit message

When the config.items value of a FlexForm select field is empty,
FlexForm parser assigns a string with indentation white spaces as
value. This is now correctly handled by the TCA migrator to avoid
warnings.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Stefan Bürk +1
    • Christian Kuhn +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 1215

  1. Christian Weiske uploaded patch set 1 08/18/25, 05:58

  2. core-ci voted on patch set 1 V +1 08/18/25, 06:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83556

  3. Stefan Bürk commented on patch set 1 08/18/25, 07:31

    Fixing this in the flexform handling to avoid setting the string with empty spaces was not an option ? That's the root cause of the issue and may also have impact at other places. However, hardening it during the TCA migration okay.
  4. Oli Bartsch commented on patch set 1 08/18/25, 07:38

    TcaMigration.php:1391

    I suggest we either skip this on string completely or in case we migrate this to an array, we should add corresponding message to inform the dev about the necessary changes.
  5. Christian Weiske uploaded patch set 2 V +1 08/18/25, 08:12

  6. Christian Weiske commented on patch set 1 08/18/25, 08:12

    Let's skip strings instead of modifying them.

    Reply

    Flexform XML is parsed with `GeneralUtility::xml2array` which converts tags with string content to strings, and tags with subtags to arrays. It does not know anything about specific meaning of 'items'.

    TcaMigration.php:1391 Reply

    Acknowledged
  7. core-ci voted on patch set 2 V +1 08/18/25, 08:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83557

  8. Oliver Klee voted on patch set 2 CR +1 V +1 08/18/25, 08:31

  9. Oli Bartsch updated the commit message in patch set 3 CR +1 V +1 08/18/25, 08:32

  10. Oli Bartsch voted on patch set 3 CR +1 V +1 08/18/25, 08:32

  11. core-ci voted on patch set 3 V +1 08/18/25, 08:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83558

  12. Stefan Bürk commented on patch set 3 CR +1 V +1 08/18/25, 08:48

    Reply

    Acknowledged
  13. Christian Kuhn voted on patch set 3 CR +1 08/18/25, 09:23

  14. Oli Bartsch voted on patch set 3 CR +2 V +2 08/18/25, 11:47

  15. Oli Bartsch merged patch set 4 08/18/25, 11:47