Review 14.3 Merged

96038[BUGFIX] Avoid TypeError in multi upload redisplay

Benni Mack CR +2 V +2 Easy +42 −1 updated 09/26/26, 01:43

Commit message

UploadedResourceViewHelper handed ObjectStorage::getPosition()
into buildResourcePointerInput(), whose $index argument is a
plain int. getPosition() is nullable and returns null for objects
missing from the internal position bookkeeping of the storage, so
redisplaying a set of uploaded files died with a TypeError.

That index only builds the __submittedFiles key and the id suffix
of the hidden resource pointer inputs. A plain loop counter covers
that and drops the dependency on ObjectStorage internals. Indexes
are zero based now, in line with the single file branch and with
the iteration index used by the remove checkbox.

On main the null case no longer occurs, as ObjectStorage gained
__serialize() and __unserialize() which rebuild the object hash
based keys of a restored form state. The type mismatch itself is
still there, a form state serialized by v14 still runs into it,
and 14.3 crashes as reported, so the counter is the cleaner take
on both branches.

Review

  • Code review CR +2 Done
    • Benni Mack +2
  • Verified V +2 Done
    • Benni Mack +2
    • core-ci +1 CI

Issues 1

Files 2

Review log 58

  1. Benni Mack commented on patch set 1 09/24/26, 14:14

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V -1 09/24/26, 14:22 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109165

  3. Benni Mack commented on patch set 2 V -1 09/24/26, 17:40

    Published edit on patch set 1.
  4. core-ci voted on patch set 2 V -1 09/24/26, 17:54 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109176

  5. Benni Mack uploaded patch set 3 V -1 09/26/26, 01:11

  6. core-ci voted on patch set 3 V +1 09/26/26, 01:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109309

  7. Benni Mack voted on patch set 3 CR +2 V +2 09/26/26, 01:43

  8. Benni Mack merged patch set 4 09/26/26, 01:43