N°2013 Fix regression when installing from scratch

Error was "Call to a member function UpdateFromParams() on null"
Regression introduced by 15d3201a
This commit is contained in:
Pierre Goiffon
2023-01-10 10:51:09 +01:00
parent 43d86ad8e2
commit 43dd0b7df8

View File

@@ -565,15 +565,16 @@ class ApplicationInstaller
if (($sEnvironment == 'production') && !$bIsAlreadyInMaintenanceMode)
{
$sConfigFilePath = utils::GetConfigFilePath($sEnvironment);
if (is_file($sConfigFilePath))
{
if (is_file($sConfigFilePath)) {
$oConfig = new Config($sConfigFilePath);
}
else
{
} else {
$oConfig = null;
}
$oConfig->UpdateFromParams($aParamValues);
if (false === is_null($oConfig)) {
$oConfig->UpdateFromParams($aParamValues);
}
SetupUtils::EnterMaintenanceMode($oConfig);
}