Skip to content
Snippets Groups Projects
Commit 38ab87f4 authored by J. Peter M. Schuler's avatar J. Peter M. Schuler Committed by Stefan Bürk
Browse files

[BUGFIX] Avoid undefined array key access in LanguageMenuProcessor

While the assumption that sys_language_uid 0 is enabled is probably
always true, there are scenarios where this isn't the case (e.g.
disabling sys_language_uid 0 for different default languages on
different sites while still allowing cross-domain-links in the correct
language).

In PHP 7.4 the LanguageMenuProcessor did a graceful fallback to nothing,
in PHP 8.1 calling a LanguageMenuProcessor with disabled base language
results in an exception `Trying to access array offset on value of type
null`

Resolves: #99156
Releases: main, 11.5
Change-Id: I443e94f6dd45d7462f5925ff014a5bfc0df40ef8
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/76761


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
parent 3bb114c9
Branches
Tags
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