From 464fefa57899d105e4aa6672f69c969275a07815 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 1 Oct 2014 15:44:43 +0200 Subject: [PATCH] Fix exception in case the database access credentials are invalid refs #7163 --- library/Icinga/Application/WebSetup.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/library/Icinga/Application/WebSetup.php b/library/Icinga/Application/WebSetup.php index bfdfe27cd..82a9c59c9 100644 --- a/library/Icinga/Application/WebSetup.php +++ b/library/Icinga/Application/WebSetup.php @@ -130,8 +130,12 @@ class WebSetup extends Wizard implements SetupWizard $skip = true; } } catch (PDOException $e) { - $db->connectToHost(); - $skip = $db->checkPrivileges($this->databaseSetupPrivileges); + try { + $db->connectToHost(); + $skip = $db->checkPrivileges($this->databaseSetupPrivileges); + } catch (PDOException $e) { + // skip should already be false, nothing to do + } } } else { $skip = true;