diff --git a/typo3/sysext/backend/Classes/Domain/Repository/Module/BackendModuleRepository.php b/typo3/sysext/backend/Classes/Domain/Repository/Module/BackendModuleRepository.php index ea0a4d5b654250f9c7df0bf8f612250343b23c9e..e697458f806a2a1db3a74e9201c8b3a4f3e669df 100644 --- a/typo3/sysext/backend/Classes/Domain/Repository/Module/BackendModuleRepository.php +++ b/typo3/sysext/backend/Classes/Domain/Repository/Module/BackendModuleRepository.php @@ -191,23 +191,25 @@ class BackendModuleRepository implements \TYPO3\CMS\Core\SingletonInterface */ protected function createMenuEntriesForTbeModulesExt() { - foreach ($GLOBALS['TBE_MODULES_EXT'] as $mainModule => $tbeModuleExt) { - list($main) = explode('_', $mainModule); - $mainEntry = $this->findByModuleName($main); - if ($mainEntry === false) { - continue; - } + if (isset($GLOBALS['TBE_MODULES_EXT'])) { + foreach ((array)$GLOBALS['TBE_MODULES_EXT'] as $mainModule => $tbeModuleExt) { + list($main) = explode('_', $mainModule); + $mainEntry = $this->findByModuleName($main); + if ($mainEntry === false) { + continue; + } - $subEntries = $mainEntry->getChildren(); - if (empty($subEntries)) { - continue; - } - $matchingSubEntry = $this->findByModuleName($mainModule); - if ($matchingSubEntry !== false) { - if (isset($tbeModuleExt['MOD_MENU']) && isset($tbeModuleExt['MOD_MENU']['function'])) { - foreach ($tbeModuleExt['MOD_MENU']['function'] as $subModule) { - $entry = $this->createEntryFromRawData($subModule); - $matchingSubEntry->addChild($entry); + $subEntries = $mainEntry->getChildren(); + if (empty($subEntries)) { + continue; + } + $matchingSubEntry = $this->findByModuleName($mainModule); + if ($matchingSubEntry !== false) { + if (isset($tbeModuleExt['MOD_MENU']) && isset($tbeModuleExt['MOD_MENU']['function'])) { + foreach ($tbeModuleExt['MOD_MENU']['function'] as $subModule) { + $entry = $this->createEntryFromRawData($subModule); + $matchingSubEntry->addChild($entry); + } } } }