diff options
Diffstat (limited to 'lib/private/Setup/AbstractDatabase.php')
-rw-r--r-- | lib/private/Setup/AbstractDatabase.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/private/Setup/AbstractDatabase.php b/lib/private/Setup/AbstractDatabase.php index d52aaa8882d..c3c873f2d8b 100644 --- a/lib/private/Setup/AbstractDatabase.php +++ b/lib/private/Setup/AbstractDatabase.php @@ -67,16 +67,16 @@ abstract class AbstractDatabase { } public function validate($config) { - $errors = array(); + $errors = []; if(empty($config['dbuser']) && empty($config['dbname'])) { - $errors[] = $this->trans->t("%s enter the database username and name.", array($this->dbprettyname)); + $errors[] = $this->trans->t("%s enter the database username and name.", [$this->dbprettyname]); } else if(empty($config['dbuser'])) { - $errors[] = $this->trans->t("%s enter the database username.", array($this->dbprettyname)); + $errors[] = $this->trans->t("%s enter the database username.", [$this->dbprettyname]); } else if(empty($config['dbname'])) { - $errors[] = $this->trans->t("%s enter the database name.", array($this->dbprettyname)); + $errors[] = $this->trans->t("%s enter the database name.", [$this->dbprettyname]); } if(substr_count($config['dbname'], '.') >= 1) { - $errors[] = $this->trans->t("%s you may not use dots in the database name", array($this->dbprettyname)); + $errors[] = $this->trans->t("%s you may not use dots in the database name", [$this->dbprettyname]); } return $errors; } @@ -109,13 +109,13 @@ abstract class AbstractDatabase { * @return \OC\DB\Connection */ protected function connect(array $configOverwrite = []) { - $connectionParams = array( + $connectionParams = [ 'host' => $this->dbHost, 'user' => $this->dbUser, 'password' => $this->dbPassword, 'tablePrefix' => $this->tablePrefix, 'dbname' => $this->dbName - ); + ]; // adding port support through installer if (!empty($this->dbPort)) { |