Review main Merged

91939[TASK] Harden FluidPageErrorHandler

Torben Hansen CR +2 V +2 Easy +8 −4 updated 12/18/25, 13:59

Commit message

This change hardens the `FluidPageErrorHandler` by ensuring that path
configurations are only set if defined in the site configuration.

Additionally, a meaningful exception is now thrown if the configured
`errorFluidTemplate` does not exist.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Oliver Klee +1
    • Guido Schmechel +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Guido Schmechel +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1318

  1. Torben Hansen uploaded patch set 1 11/30/25, 14:08

  2. Oliver Klee updated the commit message in patch set 2 11/30/25, 14:16

  3. Oliver Klee updated the commit message in patch set 3 11/30/25, 14:17

  4. core-ci voted on patch set 1 V +1 11/30/25, 14:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91295

  5. core-ci voted on patch set 2 V +1 11/30/25, 14:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91296

  6. core-ci voted on patch set 3 V +1 11/30/25, 14:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91297

  7. Oliver Klee commented on patch set 3 11/30/25, 16:23

    FluidPageErrorHandler.php:60

    If I read this code correctly, `$templatePathAndFilename` is not always defined, and we're reading a potentially undefined local variable here. (The same for the other variables further up, which we use as constructor arguments.) This feels dirty to me. Maybe we can initialize those variables to `null` in added `else` branches, and then do an `is_string` and `!== ''` check here in this line. (This would also avoid doing a boolean not on a non-boolean variable.) What do you think?
  8. Torben Hansen uploaded patch set 4 V +1 12/01/25, 06:42

  9. Torben Hansen commented on patch set 4 12/01/25, 06:43

    FluidPageErrorHandler.php:60 Reply

    All template releated variables are always defined and intitialized with `null` (right before the conditions). Since the `$configuration` array comes from site configuration we can not be sure, that expected values are strings. The patch therefore falls back to a boolean value for configuration values to negate the `is_string` check if the configuration value is not defined. I changed to patch to be better readable by adding `!== ''` checks in the conditions.
  10. core-ci voted on patch set 4 V +1 12/01/25, 06:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91321

  11. Oliver Klee commented on patch set 4 CR +1 12/01/25, 10:26

    FluidPageErrorHandler.php:60 Reply

    Ah, thanks, my bad, I totally missed that.
  12. Christian Kuhn updated the commit message in patch set 5 CR +1 V +1 12/08/25, 19:42

  13. core-ci voted on patch set 5 V +1 12/08/25, 19:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91835

  14. Oliver Klee voted on patch set 5 CR +1 12/08/25, 20:14

  15. Simon Schaufelberger voted on patch set 5 CR +1 V +1 12/15/25, 16:02

  16. Guido Schmechel voted on patch set 5 CR +1 V +1 12/17/25, 10:16

  17. Christian Kuhn voted on patch set 5 CR +2 V +2 12/18/25, 13:47

  18. Christian Kuhn merged patch set 6 12/18/25, 13:59