Merge branch 'hotfix/5.9.4'

This commit is contained in:
Yuri Kuznetsov
2020-09-23 10:18:25 +03:00
@@ -154,8 +154,7 @@ class Upgrade implements Command
fwrite(\STDOUT, "\n");
$app = new \Espo\Core\Application();
$currentVerison = $app->getContainer()->get('config')->get('version');
$currentVerison = $this->getCurrentVersion();
fwrite(\STDOUT, "Upgrade is complete. Current version is {$currentVerison}.\n");
@@ -225,8 +224,7 @@ class Upgrade implements Command
return;
}
$app = new \Espo\Core\Application();
$currentVerison = $app->getContainer()->get('config')->get('version');
$currentVerison = $this->getCurrentVersion();
fwrite(\STDOUT, "Upgrade is complete. Current version is {$currentVerison}.\n");
@@ -420,4 +418,15 @@ class Upgrade implements Command
return true;
}
protected function getCurrentVersion()
{
$configData = include "data/config.php";
if (!$configData) {
return null;
}
return $configData['version'] ?? null;
}
}