Review 13.4 Merged

93015[BUGFIX] Handle missing sys_file_reference in ExtendedFileUtility

Rico Sonntag CR +2 V +2 Easy +9 −3 updated 03/02/26, 19:48

Commit message

When deleting a file that has a reference in sys_refindex but the
corresponding sys_file_reference record is missing (e.g. due to
database inconsistency), transformFileReferenceToRecordReference()
returns false from fetchAssociative(). This false value is then
passed to BackendUtility::getRecord() which expects a string,
causing a TypeError (HTTP 503).

This can happen when sys_file_reference records are deleted without
updating sys_refindex, for example during manual database cleanup
or failed transactions.

The fix adds a null return type to
transformFileReferenceToRecordReference() when the sys_file_reference
record is not found, and handles this case in func_delete() by
treating it as a broken reference.

Review

  • Code review CR +2 Done
    • Anja Leichsenring +2
  • Verified V +2 Done
    • Anja Leichsenring +2
    • core-ci +1 CI

Issues 1

Files 1

Review log 710

  1. Rico Sonntag uploaded patch set 1 02/26/26, 12:45

  2. core-ci voted on patch set 1 V +1 02/26/26, 13:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96913

  3. Garvin Hicking abandoned the change 02/26/26, 19:36

  4. Anja Leichsenring restored the change 03/02/26, 19:36

  5. Anja Leichsenring uploaded patch set 2 V +1 03/02/26, 19:38

  6. Anja Leichsenring updated the commit message in patch set 3 03/02/26, 19:38

  7. core-ci voted on patch set 2 V +1 03/02/26, 19:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97134

  8. core-ci voted on patch set 3 V +1 03/02/26, 19:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97135

  9. Anja Leichsenring voted on patch set 3 CR +2 V +2 03/02/26, 19:48

  10. Anja Leichsenring merged patch set 4 03/02/26, 19:48