diff --git a/Classes/FormEngine/Elements/History.php b/Classes/FormEngine/Elements/History.php index 08a3946..50841fe 100644 --- a/Classes/FormEngine/Elements/History.php +++ b/Classes/FormEngine/Elements/History.php @@ -45,7 +45,7 @@ public function __construct(NodeFactory $nodeFactory, array $data, StandaloneVie $this->templateView->getRenderingContext()->getTemplatePaths()->fillDefaultsByPackageName('page_speed_insights'); $this->templateView->setTemplate('History'); - $this->strategyToShow = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['page_speed_insights']['strategyToShow'] ?: 'mobile'; + $this->strategyToShow = ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['page_speed_insights']['strategyToShow'] ?? '') ?: 'mobile'; } public function render() diff --git a/Classes/Hooks/DrawHeaderHook.php b/Classes/Hooks/DrawHeaderHook.php index c040c6b..b704f99 100644 --- a/Classes/Hooks/DrawHeaderHook.php +++ b/Classes/Hooks/DrawHeaderHook.php @@ -38,7 +38,7 @@ public function __construct(StandaloneView $templateView = null, PageRenderer $p $this->templateView->getRenderingContext()->getTemplatePaths()->fillDefaultsByPackageName('page_speed_insights'); $this->templateView->setTemplate('DrawHeaderHook'); - $this->strategyToShow = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['page_speed_insights']['strategyToShow'] ?: 'mobile'; + $this->strategyToShow = ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['page_speed_insights']['strategyToShow'] ?? '') ?: 'mobile'; } public function render(): string