Review main Merged

95820[BUGFIX] Avoid TypeError in multi upload redisplay

Georg Ringer CR +2 V +2 Easy +44 −1 updated 09/24/26, 14:14

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
    • Oliver Klee +1
    • Wouter Wolters +1
    • Josua Vogel +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oliver Klee +1
    • Wouter Wolters +1
    • Josua Vogel +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 89

  1. Georg Ringer uploaded patch set 1 09/14/26, 20:01

  2. Georg Ringer commented on patch set 1 09/14/26, 20:02

    This change is ready for review.
  3. core-ci voted on patch set 1 V +1 09/14/26, 20:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108552

  4. Benni Mack voted on patch set 1 CR +1 V +1 09/23/26, 15:43

  5. Wouter Wolters voted on patch set 1 CR +1 V +1 09/23/26, 17:59

  6. Josua Vogel voted on patch set 1 CR +1 V +1 09/24/26, 13:26

  7. Oliver Klee voted on patch set 1 CR +1 V +1 09/24/26, 14:10

  8. Benni Mack voted on patch set 1 CR +2 V +2 09/24/26, 14:14

  9. Benni Mack merged patch set 2 09/24/26, 14:14