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

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 2