Review 10.4 Merged

73095[BUGFIX] Use LanguageServiceFactory in FE RequestHandler

Oli Bartsch CR +2 V +2 Easy +13 −5 updated 01/20/22, 12:26

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
  • Verified V +2 Done
    • Oli Bartsch +2
    • core-ci +1 CI

Issues 1

Files 2

Review log 34

  1. Oli Bartsch uploaded patch set 1 01/19/22, 20:35

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

  3. Oli Bartsch voted on patch set 1 V +2 CR +2 01/20/22, 12:26

  4. Oli Bartsch merged patch set 2 01/20/22, 12:26