Review main Merged

93847[BUGFIX] Cast group identifier to string in foreach key variable

Nikita Hovratov CR +2 V +2 Easy +48 −0 updated 05/02/26, 10:50

Commit message

If a group identifier is defined as a numeric string like "2026", then
this will be converted to an integer key for PHP array `$itemGroups`.
Therefore the key must be cast to a string or else strict type checking
will fail for object `SelectItem`.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Georg Ringer +1
    • Oliver Klee +1
    • Jörg Bösche +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Georg Ringer +1
    • Oliver Klee +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 910

  1. Nikita Hovratov uploaded patch set 1 04/27/26, 11:32

  2. core-ci voted on patch set 1 V +1 04/27/26, 12:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/101165

  3. Oliver Klee voted on patch set 1 CR +1 04/27/26, 12:15

  4. Oliver Klee voted on patch set 1 V +1 04/27/26, 12:48

  5. Georg Ringer voted on patch set 1 CR +1 V +1 04/27/26, 14:38

  6. Jörg Bösche voted on patch set 1 CR +1 04/28/26, 06:35

  7. Oliver Klee commented on patch set 1 04/30/26, 07:55

    SelectItemProcessor.php:123

    (not blocking) Would it make sense to move the cast to this line? Then we don't modify the key (avoiding potential confusion for the reader) and make the intention of the code more clear.
  8. Nikita Hovratov commented on patch set 1 04/30/26, 12:46

    SelectItemProcessor.php:123 Reply

    I think the real solution is not to use php arrays for itemGroups in the first place. We need a data structure that ensures all keys and values are strings. But this is for another time maybe.
  9. Christian Kuhn commented on patch set 1 CR +2 V +2 05/02/26, 10:33

    SelectItemProcessor.php:123 Reply

    Done
  10. Christian Kuhn merged patch set 2 05/02/26, 10:50