N.1151 compiler : throw an exception if a module contains an unknown menuId reference

SVN:trunk[5128]
This commit is contained in:
Pierre Goiffon
2017-11-10 13:42:55 +00:00
parent 0f7099acfa
commit 011e6d895b

View File

@@ -334,6 +334,10 @@ EOF;
foreach($aMenusToLoad as $sMenuId)
{
$oMenuNode = $aMenuNodes[$sMenuId];
if (is_null($oMenuNode))
{
throw new Exception("Module '{$oModule->GetId()}' (location : '$sModuleRootDir') contains an unknown menuId : '$sMenuId'");
}
if ($oMenuNode->getAttribute("xsi:type") == 'MenuGroup')
{
// Note: this algorithm is wrong