Review 11.5 Merged

76779[BUGFIX] Avoid undefined array key access in LanguageMenuProcessor

Stefan Bürk CR +2 V +2 Easy +1 −1 updated 11/23/22, 18:23

Commit message

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`

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
  • Verified V +2 Done
    • Stefan Bürk +2
    • core-ci +1 CI

Issues 1

Files 1

Review log 34

  1. Stefan Bürk commented on patch set 1 11/23/22, 16:08

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 11/23/22, 16:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34122

  3. Stefan Bürk voted on patch set 1 V +2 CR +2 11/23/22, 18:23

  4. Stefan Bürk merged patch set 2 11/23/22, 18:23