Bug #102457
closedFrontendConfigurationManager->getTypoScriptSetup() should return empty array if TSFE is not initialized
100%
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
Updated by Gerrit Code Review 12 months ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81863
Updated by Simon Schaufelberger 12 months ago
This seams like a bug in the extension
Updated by Gerrit Code Review 12 months ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81863
Updated by Gerrit Code Review 12 months ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81863
Updated by Gerrit Code Review 12 months ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81962
Updated by Markus Gerdes 12 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 23f474f13a9f9974de538098f0ead0059075befc.
Updated by Markus Gerdes 12 months ago
Thanks everybody for fixing in light speed ;-)