Actions
Bug #102457
closedFrontendConfigurationManager->getTypoScriptSetup() should return empty array if TSFE is not initialized
Start date:
2023-11-22
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:
Description
As written in the comment of the FrontendConfigurationManager Line 202ff the setup should be an empty array in v12 to be backward compatible.
If
$request->getAttribute('frontend.typoscript');
returns null this would not be a RuntimeException and should be checked separately.
Steps to reproduce:
install schams-net/nagios@4.1.0 extension and call the included middleware.
This results in an Errorpage
Call to a member function getSetupArray() on null in /var/www/html/vendor/typo3/cms-extbase/Classes/Configuration/FrontendConfigurationManager.php line 202 /** @var ServerRequestInterface $request */ $request = $this->request ?? $GLOBALS['TYPO3_REQUEST']; $frontendTypoScript = $request->getAttribute('frontend.typoscript'); try { return $frontendTypoScript->getSetupArray(); } catch (\RuntimeException) { // This Extbase bootstrap is executed in a context where TSFE did not calculate TS. // // This catch mitigates a "You're doing in wrong" case in TYPO3 v12:```
Environment:
TYPO3 v12.4.8
PHP 8.2.1
Linux
Actions