mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 01:28:47 +02:00
N°4751 - Fix crash when disabling newsroom in configuration
This commit is contained in:
@@ -253,7 +253,15 @@ class NavigationMenu extends UIBlock implements iKeyboardShortcut
|
||||
*/
|
||||
public function GetSubBlocks(): array
|
||||
{
|
||||
return [$this->oUserMenu->GetId() => $this->oUserMenu, $this->GetNewsroomMenu()->GetId() => $this->GetNewsroomMenu()];
|
||||
$aSubBlocks = [
|
||||
$this->oUserMenu->GetId() => $this->oUserMenu,
|
||||
];
|
||||
|
||||
if ($this->IsNewsroomEnabled()) {
|
||||
$aSubBlocks[$this->GetNewsroomMenu()->GetId()] = $this->GetNewsroomMenu();
|
||||
}
|
||||
|
||||
return $aSubBlocks;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user