Review main Merged

90684[BUGFIX] Fix FAL getFileReferenceData method return signature

Garvin Hicking CR +2 V +2 Easy +14 −3 updated 09/17/25, 18:25

Commit message

The `ResourceFactory->getFileReferenceData()` method executes a
QueryBuilder query which may return false on empty data. The
return type of that method though did not allow a `false` return.

The only consumer of the method in `ResourceFactory` later on only
checks for `!is_array()` to throw an exception.

This patch now ensures the proper exception can be thrown in case
of a non-found FileReference UID.

Review

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

Issues 1

Files 2

Review log 1215

  1. Garvin Hicking uploaded patch set 1 09/15/25, 09:11

  2. core-ci voted on patch set 1 V +1 09/15/25, 09:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84977

  3. Oliver Klee voted on patch set 1 CR +1 09/15/25, 09:52

  4. Oliver Klee commented on patch set 1 09/15/25, 09:53

    Is there any way to cover this with a regression test?
  5. Garvin Hicking updated the commit message in patch set 2 CR +1 V +1 09/15/25, 10:12

  6. Garvin Hicking commented on patch set 2 09/15/25, 10:13

    Reply

    I'll have a look, maybe this can even be done in a functional test without mocking by requesting a non-existant record and doing an expectation on receiving an exception
  7. core-ci voted on patch set 2 V +1 09/15/25, 10:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84980

  8. Garvin Hicking uploaded patch set 3 V +1 09/15/25, 10:49

  9. Garvin Hicking commented on patch set 3 09/15/25, 10:49

    Reply

    Done
  10. Oliver Klee voted on patch set 3 CR +1 V +1 09/15/25, 10:55

  11. core-ci voted on patch set 3 V +1 09/15/25, 10:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84981

  12. Ingo Hollmann commented on patch set 3 09/16/25, 11:28

    It seems like the patch fixed our problem completely. As our extension already catches the now thrown exception, everything works now as expected.
  13. Christian Kuhn voted on patch set 3 CR +1 V +1 09/17/25, 15:39

  14. Georg Ringer voted on patch set 3 CR +2 V +2 09/17/25, 18:25

  15. Georg Ringer merged patch set 4 09/17/25, 18:25