solve code review

Signed-off-by: Vitor Mattos <vitor@php.rio>
This commit is contained in:
Vitor Mattos 2019-04-22 19:57:11 -03:00
parent 4d187ce1d7
commit 35465ca90c
1 changed files with 1 additions and 1 deletions

View File

@ -155,7 +155,7 @@ class PostgreSQL extends AbstractDatabase {
$query = $connection->prepare("CREATE USER " . addslashes($this->dbUser) . " CREATEDB PASSWORD '" . addslashes($this->dbPassword) . "'");
$query->execute();
if ($this->databaseExists($connection)) {
$query = $connection->prepare('GRANT CONNECT ON DATABASE ' . $this->dbName . ' TO '.addslashes($this->dbUser));
$query = $connection->prepare('GRANT CONNECT ON DATABASE ' . addslashes($this->dbName) . ' TO '.addslashes($this->dbUser));
$query->execute();
}
} catch (DatabaseException $e) {