From b5559b52eb036e86ce99216cd7235f37fb00eee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20D?= Date: Sat, 20 Jul 2019 20:51:28 +0200 Subject: [PATCH] * [FIX] Skip over initialization when upgrade is needed. Thanks to @Envikia and @alexseys for the notice. Closes #1355 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rubén D --- app/modules/api/Init.php | 4 +--- app/modules/web/Init.php | 10 ++++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/modules/api/Init.php b/app/modules/api/Init.php index c6a92e28..83e11c02 100644 --- a/app/modules/api/Init.php +++ b/app/modules/api/Init.php @@ -137,11 +137,9 @@ final class Init extends ModuleBase /** * Comprobar si es necesario actualizar componentes * - * @throws InitializationException - * @throws DependencyException - * @throws NotFoundException * @throws EnvironmentIsBrokenException * @throws FileException + * @throws InitializationException */ private function checkUpgrade() { diff --git a/app/modules/web/Init.php b/app/modules/web/Init.php index 9a25cda4..40c6fede 100644 --- a/app/modules/web/Init.php +++ b/app/modules/web/Init.php @@ -185,6 +185,8 @@ final class Init extends ModuleBase $this->router->response() ->redirect('index.php?r=install/index') ->send(); + + return; } // Checks if the database is set up @@ -194,6 +196,8 @@ final class Init extends ModuleBase $this->router->response() ->redirect('index.php?r=error/databaseConnection') ->send(); + + return; } // Checks if maintenance mode is turned on @@ -203,6 +207,8 @@ final class Init extends ModuleBase $this->router->response() ->redirect('index.php?r=error/maintenanceError') ->send(); + + return; } // Checks if upgrade is needed @@ -214,6 +220,8 @@ final class Init extends ModuleBase $this->router->response() ->redirect('index.php?r=upgrade/index') ->send(); + + return; } // Checks if the database is set up @@ -223,6 +231,8 @@ final class Init extends ModuleBase $this->router->response() ->redirect('index.php?r=error/databaseError') ->send(); + + return; } // Initialize event handlers