Add check to prevent setup crash when creating config

Cherry-pick of 09b12bd0
This will prevent also a warning when running on PHP 8.0 (N°3129)
This commit is contained in:
Pierre Goiffon
2022-02-24 15:38:27 +01:00
parent 83e98ef2b8
commit 968a0e5f3a

View File

@@ -748,16 +748,17 @@ class RunTimeEnvironment
$aAvailableModules = $this->AnalyzeInstallation($oConfig, $this->GetBuildDir());
foreach($aSelectedModuleCodes as $sModuleId)
{
if (!array_key_exists($sModuleId, $aAvailableModules)) {
continue;
}
$aModuleData = $aAvailableModules[$sModuleId];
$sName = $sModuleId;
$sVersion = $aModuleData['version_code'];
$aComments = array();
$aComments[] = $sShortComment;
if ($aModuleData['mandatory'])
{
if ($aModuleData['mandatory']) {
$aComments[] = 'Mandatory';
}
else
} else
{
$aComments[] = 'Optional';
}