🐛 Fix runtime crash if $GLOBALS: TSFE is not set on PHP 8 and higher
This is the case for the backend. Setting it to null yields to an early abortion in the addLibrary function.
This commit is contained in:
parent
01c8997c1d
commit
9c43bfc8f5
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ class PageRendererPreProcess
|
||||||
public function __construct(AssetCollector $assetCollector = null)
|
public function __construct(AssetCollector $assetCollector = null)
|
||||||
{
|
{
|
||||||
$this->assetCollector = $assetCollector ?? GeneralUtility::makeInstance(AssetCollector::class);
|
$this->assetCollector = $assetCollector ?? GeneralUtility::makeInstance(AssetCollector::class);
|
||||||
$this->tsfe = $GLOBALS['TSFE'];
|
$this->tsfe = $GLOBALS['TSFE'] ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addLibrary(): void
|
public function addLibrary(): void
|
||||||
|
|
Loading…
Reference in a new issue