Skip to content
Snippets Groups Projects
Commit f4729c20 authored by Oliver Bartsch's avatar Oliver Bartsch
Browse files

[BUGFIX] Use LanguageServiceFactory in FE RequestHandler

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.

Resolves: #96590
Releases: main, 11.5, 10.4
Change-Id: I160a9dae9131973d681b392ee713d1fadcb9a24b
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73095


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
parent 82c295f6
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment