Review main Merged

64908[BUGFIX] Avoid fatal error in image rendering when processing fails

Helmut Hummel CR +2 V +2 Easy +9 −9 updated 11/17/21, 10:19

Commit message

Fatal error can occur, when the file variable isn't a string,
which only happens, when file processing failed or the resolved
file isn't an image.

Nevertheless the fatal error should be avoided.

Also clean up some variable usage to not change the type
of variable and remove some not needed isset() check
for better readability.

Review

  • Code review CR +2 Done
    • Helmut Hummel +2
    • Georg Ringer +1
    • Oli Bartsch +1
    • Oliver Klee +1
  • Verified V +2 Done
    • Helmut Hummel +2
    • Georg Ringer +1
    • Oli Bartsch +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1822

  1. Helmut Hummel uploaded patch set 1 06/19/20, 10:27

  2. Markus Klein voted on patch set 1 CR +1 06/19/20, 10:32

  3. TYPO3com voted on patch set 1 V -1 06/19/20, 10:43 Completed build in 15m 47s on Fri, 19 Jun, 10:43 AM Test Summary: 72509 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3957

  4. TYPO3com voted on patch set 1 V +1 06/19/20, 13:23 Completed build in 3h 12m 04s on Fri, 19 Jun, 01:23 PM Test Summary: 72860 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3957

  5. Daniel Goerz voted on patch set 1 CR +1 06/21/20, 12:38

  6. Andreas Kienast voted on patch set 1 CR +1 06/26/20, 13:22

  7. Jörg Bösche voted on patch set 1 CR +1 09/02/20, 08:49

  8. Benni Mack voted on patch set 1 V +1 CR +1 09/04/20, 06:36

  9. Oliver Klee voted on patch set 1 CR +1 09/04/20, 07:53

  10. Alexander Schnitzler commented on patch set 1 CR -1 09/04/20, 07:57

    ContentObjectRenderer.php:3980

    Can we please make sure that $importedFile is a boolean if used as such or that we implement a more proper check depending on the type? It might also make sense to change the default variable value from null to false then in line 3938.
  11. Anja Leichsenring uploaded patch set 2 11/03/21, 18:43

  12. Anja Leichsenring commented on patch set 2 11/03/21, 18:44

    ping, @Helmut, could you have a look please? The code change seems still valid, Alex' comment from PS 2 still applies. I only rebased the patch.
  13. Oliver Klee voted on patch set 2 CR +1 11/03/21, 18:46

  14. core-ci voted on patch set 2 V -1 11/03/21, 19:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18810

  15. core-ci voted on patch set 2 V +1 11/03/21, 21:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18810

  16. Markus Klein commented on patch set 2 11/04/21, 07:31

    ContentObjectRenderer.php:3980 Reply

    Why convert to boolean value explicitly? Can you please elaborate on the necessity? Maybe I miss some detail here, but the proposed change is totally valid. (I would even argue the !empty() in line 3964 is totally superfluous.)
  17. Alexander Schnitzler commented on patch set 2 11/05/21, 15:20

    ContentObjectRenderer.php:3980 Reply

    Sorry but this comment was a year ago. I can't really relate to it any more. I'll mark this solved and let you, who are active on this now, handle this.
  18. Alexander Schnitzler wrote 11/05/21, 15:20

    Removed reviewer Alexander Schnitzler.
  19. Georg Ringer voted on patch set 2 V +1 CR +1 11/16/21, 18:55

  20. Oli Bartsch voted on patch set 2 V +1 CR +1 11/16/21, 22:31

  21. Helmut Hummel voted on patch set 2 V +2 CR +2 11/17/21, 10:19

  22. Helmut Hummel merged patch set 3 11/17/21, 10:19