Skip to content
Commit 61873701 authored by madaxel's avatar madaxel Committed by Stefan Bürk
Browse files

[BUGFIX] Avoid calling method on unavailable `frontend.typoscript`

The request attribute 'frontend.typoscript' might not be initialized
at the point of calling `$request->getAttribute` and will return null.

Even if this indicates that something is trying to access extbase to
early in the stack without taking care to bootstrap it properly, the
core should avoid a fatal error at that point.

Therefore, a access guard is added in the `getTypoScriptSetup` method
of the `FrontendConfigurationManager` to mitigate the fatal php error.
The added guard does not fix the invalid state at that point as this
is impossible, so extensions messing around in that early state may
now not fatal but left with an invalid and incomplete state anyway.

Note: This will replaced with a dedicated meaningfull exception in v13
      only in followup.

Resolves: #102457
Releases: main, 12.4
Change-Id: I00ec0e95d3f5b92abf9ee5dabcf24369b5d6374b
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81962


Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
parent 2a72b590
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