cannot write itop conf error durring setup wizard: add preventive check when empty dependencies

This commit is contained in:
odain
2021-04-22 14:56:50 +02:00
parent 9de1f1800d
commit a478294211

View File

@@ -741,33 +741,30 @@ class RunTimeEnvironment
//
$aAvailableExtensions = array();
$aAvailableModules = $this->AnalyzeInstallation($oConfig, $this->GetBuildDir());
foreach($aSelectedModuleCodes as $sModuleId)
{
if (!empty($aSelectedModuleCodes)) {
foreach ($aSelectedModuleCodes as $sModuleId) {
$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';
}
if ($aModuleData['visible'])
{
if ($aModuleData['visible']) {
$aComments[] = 'Visible (during the setup)';
}
else
{
} else {
$aComments[] = 'Hidden (selected automatically)';
}
foreach ($aModuleData['dependencies'] as $sDependOn)
{
$aDependencies = $aModuleData['dependencies'];
if (!empty($aDependencies)) {
foreach ($aDependencies as $sDependOn) {
$aComments[] = "Depends on module: $sDependOn";
}
}
$sComment = implode("\n", $aComments);
$oInstallRec = new ModuleInstallation();
@@ -778,6 +775,7 @@ class RunTimeEnvironment
$oInstallRec->Set('installed', $iInstallationTime);
$oInstallRec->DBInsertNoReload();
}
}
if ($this->oExtensionsMap)
{