N°5619 - fixed crash when no provider at all!

This commit is contained in:
denis.flaven@combodo.com
2022-11-17 11:09:12 +01:00
committed by odain
parent 34d8e52c22
commit 1bbcd9656a

View File

@@ -35,6 +35,7 @@ use MetaModel;
use UIExtKeyWidget;
use UserRights;
use utils;
use Combodo\iTop\Application\UI\Base\Component\PopoverMenu\NewsroomMenu\NewsroomMenuFactory;
/**
* Class NavigationMenu
@@ -269,7 +270,7 @@ class NavigationMenu extends UIBlock implements iKeyboardShortcut
*/
public function IsNewsroomEnabled(): bool
{
return MetaModel::GetConfig()->Get('newsroom_enabled');
return (MetaModel::GetConfig()->Get('newsroom_enabled') && NewsroomMenuFactory::HasProviders());
}
/**