From 7cd82b1e0397e4d5276da119bee401317937fac8 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Sat, 2 Oct 2021 11:12:58 +0300 Subject: [PATCH] warning fix --- extension.php | 6 ++---- upgrade.php | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/extension.php b/extension.php index e8f7d9cae3..383da1f43b 100644 --- a/extension.php +++ b/extension.php @@ -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"; diff --git a/upgrade.php b/upgrade.php index 3f32a24f0f..14beaad866 100644 --- a/upgrade.php +++ b/upgrade.php @@ -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";