Skip to content

Commit

Permalink
Fix exception in case the database access credentials are invalid
Browse files Browse the repository at this point in the history
refs #7163
  • Loading branch information
Johannes Meyer committed Oct 1, 2014
1 parent 3a11182 commit 464fefa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions library/Icinga/Application/WebSetup.php
Expand Up @@ -130,8 +130,12 @@ protected function getNewPage($requestedPage, Form $originPage)
$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;
Expand Down

0 comments on commit 464fefa

Please sign in to comment.