From 6cdc63ff69fc4e0f82c8bb4e124e8c9f96ef3da2 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 5 Feb 2020 12:47:08 +0100 Subject: [PATCH] Correctly append the port to the host so it's written to the config correctly Signed-off-by: Joas Schilling --- core/Command/Maintenance/Install.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/Command/Maintenance/Install.php b/core/Command/Maintenance/Install.php index 39692e036ba..f5b85b4c3a7 100644 --- a/core/Command/Maintenance/Install.php +++ b/core/Command/Maintenance/Install.php @@ -132,6 +132,10 @@ class Install extends Command { } else { $dbHost = $input->getOption('database-host'); } + if ($dbPort) { + // Append the port to the host so it is the same as in the config (there is no dbport config) + $dbHost .= ':' . $dbPort; + } $dbTablePrefix = 'oc_'; if ($input->hasParameterOption('--database-table-prefix')) { $dbTablePrefix = (string) $input->getOption('database-table-prefix'); @@ -181,7 +185,6 @@ class Install extends Command { 'dbpass' => $dbPass, 'dbname' => $dbName, 'dbhost' => $dbHost, - 'dbport' => $dbPort, 'dbtableprefix' => $dbTablePrefix, 'adminlogin' => $adminLogin, 'adminpass' => $adminPassword, -- 2.39.5