Review main Merged

73068[BUGFIX] Use LanguageServiceFactory in FE RequestHandler

Oli Bartsch CR +2 V +2 Easy +4 −6 updated 01/19/22, 20:31

Commit message

When previewing pages a null pointer exception
is triggered in the frontend RequestHandler, in
case $GLOBALS['LANG'] does not exist. This
is the case when no user object exists (or is
not a FrontendBackendUserAuthentication).

This is now fixed by creating the LanguageService
with the corresponding factory and no longer relying
on $GLOBALS['LANG'].

Additionally, another possible null pointer is
fixed in the factory, since createFromUserPreferences()
allows NULL for the first parameter "$user"
but previously did not check the provided
value before accessing.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Stefan Bürk +1
    • Andreas Kienast +1
    • Benni Mack +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Stefan Bürk +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 810

  1. Oli Bartsch uploaded patch set 1 01/19/22, 15:54

  2. Benni Mack voted on patch set 1 V +1 CR +1 01/19/22, 16:00

  3. core-ci voted on patch set 1 V -1 01/19/22, 16:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22278

  4. Oli Bartsch uploaded patch set 2 01/19/22, 16:14

  5. core-ci voted on patch set 2 V +1 01/19/22, 16:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22279

  6. Benni Mack voted on patch set 2 V +1 CR +1 01/19/22, 16:37

  7. Andreas Kienast voted on patch set 2 CR +1 01/19/22, 16:56

  8. Stefan Bürk voted on patch set 2 V +1 CR +1 01/19/22, 17:34

  9. Oli Bartsch voted on patch set 2 V +2 CR +2 01/19/22, 20:31

  10. Oli Bartsch merged patch set 3 01/19/22, 20:31