From 91ba757218b8140b4ad45597d7b59bcefb11129d Mon Sep 17 00:00:00 2001 From: David Mellen Date: Wed, 20 Jul 2022 08:03:16 +0200 Subject: [PATCH] [Bugfix] Fix TypeError and call on null in DataStructureIdentifierHook Change-Id: I45abd07d29abb782dbf2338d67583eadf1fa2c89 --- .../form/Classes/Hooks/DataStructureIdentifierHook.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/typo3/sysext/form/Classes/Hooks/DataStructureIdentifierHook.php b/typo3/sysext/form/Classes/Hooks/DataStructureIdentifierHook.php index 7ece56bfb5..5f5b03193e 100644 --- a/typo3/sysext/form/Classes/Hooks/DataStructureIdentifierHook.php +++ b/typo3/sysext/form/Classes/Hooks/DataStructureIdentifierHook.php @@ -51,7 +51,7 @@ class DataStructureIdentifierHook public function __construct() { - $this->getLanguageService()->includeLLFile('EXT:form/Resources/Private/Language/Database.xlf'); + $this->getLanguageService()?->includeLLFile('EXT:form/Resources/Private/Language/Database.xlf'); } /** @@ -395,8 +395,8 @@ class DataStructureIdentifierHook return $finishersDefinition; } - protected function getLanguageService(): LanguageService + protected function getLanguageService(): ?LanguageService { - return $GLOBALS['LANG']; + return $GLOBALS['LANG'] ?? null; } } -- 2.37.1.windows.1