Review main Merged

81706[BUGFIX] Prevent possible PHP crash with empty systemLocale (follow-up)

Garvin Hicking CR +2 V +2 Easy +4 −2 updated 11/20/23, 15:00

Commit message

This is a follow-up to patch 81704 and adds one more guard
to a usage of possibly empty $GLOBALS['TYPO3_CONF_VARS']['SYS']
['systemLocale']

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Oliver Klee +1
    • Christian Kuhn +1
    • Andreas Kienast +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 2

Files 2

Review log 2023

  1. Garvin Hicking uploaded patch set 1 11/08/23, 07:36

  2. Garvin Hicking commented on patch set 1 11/08/23, 07:36

    Added what I wrote yesterday as a follow-up patch, hth.
  3. Xavier Perseguers voted on patch set 1 V +1 CR +1 11/08/23, 07:37

  4. Xavier Perseguers commented on patch set 1 11/08/23, 07:38

    Didn't face this problem while debugging yesterday but the follow-up is logical and for sure is an additional useful safeguard.
  5. core-ci voted on patch set 1 V +1 11/08/23, 07:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48702

  6. Oliver Klee voted on patch set 1 CR +1 11/08/23, 12:42

  7. Oli Bartsch commented on patch set 1 11/08/23, 12:59

    FileContentParser.php:737

    I think using if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['systemLocale'] ?? false) would also work, allowing to be more explicit by preventing usage of the magic "empty()" method.
  8. Garvin Hicking commented on patch set 1 11/08/23, 14:51

    FileContentParser.php:737 Reply

    Since this is just a follow-up patch, would you want this to apply also to the parrent patch (that's been merged into v12+main already)? I can expand this patch to do that of course.
  9. Oli Bartsch commented on patch set 1 11/08/23, 17:32

    FileContentParser.php:737 Reply

    Good point, let's adjust this place as well.
  10. Garvin Hicking uploaded patch set 2 CR +1 V +1 11/08/23, 19:52

    Prevent using empty magic method
  11. Garvin Hicking commented on patch set 2 11/08/23, 19:53

    FileContentParser.php:737 Reply

    Refactored the two methods.
  12. core-ci voted on patch set 2 V +1 11/08/23, 19:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48731

  13. Garvin Hicking commented on patch set 2 11/09/23, 12:01

    Reply

    Done
  14. Oliver Klee voted on patch set 2 CR +1 11/09/23, 12:13

  15. Stefan Bürk commented on patch set 2 CR -1 11/19/23, 21:36

    This uses the same forge issue number for the resolve line as https://review.typo3.org/c/Packages/TYPO3.CMS/+/81704. This needs a new issue on forge and used as `Resolve`. The issue number of the related change (#102343) needs to be added as `related` line - and the new issue should be linked to the #102343 issue.
  16. Garvin Hicking uploaded patch set 3 CR +1 V +1 11/20/23, 08:30

    Refer to fresh issue
  17. Garvin Hicking commented on patch set 3 11/20/23, 08:30

    Reply

    Done
  18. core-ci voted on patch set 3 V +1 11/20/23, 08:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49119

  19. Oliver Klee voted on patch set 3 CR +1 11/20/23, 08:39

  20. Andreas Kienast voted on patch set 3 CR +1 11/20/23, 10:04

  21. Christian Kuhn voted on patch set 3 V +1 CR +1 11/20/23, 14:56

  22. Oli Bartsch voted on patch set 3 V +2 CR +2 11/20/23, 15:00

  23. Oli Bartsch merged patch set 4 11/20/23, 15:00