warning fix

This commit is contained in:
Yuri Kuznetsov
2021-10-02 11:12:58 +03:00
parent 2c8a21fc04
commit 7cd82b1e03
2 changed files with 4 additions and 8 deletions

View File

@@ -43,8 +43,6 @@ use Espo\Core\{
Upgrades\ExtensionManager,
};
use Exception;
$arg = isset($_SERVER['argv'][1]) ? trim($_SERVER['argv'][1]) : '';
if (empty($arg)) {
@@ -78,13 +76,13 @@ try {
$upgradeId = $upgradeManager->upload($fileData);
$upgradeManager->install(array('id' => $upgradeId));
}
catch (Exception $e) {
catch (\Exception $e) {
die("Error: " . $e->getMessage() . "\n");
}
try {
(new Application())->run(Rebuild::class);
}
catch (Exception $e) {}
catch (\Exception $e) {}
echo "Extension installation is complete.\n";

View File

@@ -43,8 +43,6 @@ use Espo\Core\{
Upgrades\UpgradeManager,
};
use Exception;
$arg = isset($_SERVER['argv'][1]) ? trim($_SERVER['argv'][1]) : '';
if ($arg == 'version' || $arg == '-v') {
@@ -87,13 +85,13 @@ try {
$upgradeManager->install(['id' => $upgradeId]);
}
catch (Exception $e) {
catch (\Exception $e) {
die("Error: " . $e->getMessage() . "\n");
}
try {
(new Application())->run(Rebuild::class);
}
catch (Exception $e) {}
catch (\Exception $e) {}
echo "Upgrade is complete. Current version is " . $config->get('version') . ". \n";