@@ -47,6 +47,8 @@ public $dbtype; /** @var string $dblocation */ public $dblocation = 'localhost'; + /** @var string $dbport */ + public $dbport; /** @var string $dbname */ public $dbname; @@ -570,10 +572,11 @@ if (strpos($this->dblocation, ':') !== false) { $pieces = explode(':', $this->dblocation, 2); if (isset($pieces[1]) && is_numeric($pieces[1])) { - return $pieces[1]; + $this->dblocation = str_replace(":" . $pieces[1], "", $this->dblocation); + $this->dbport = $pieces[1]; } } - return $this->getDbDefaultPort(); + return $this->dbport ?? $this->getDbDefaultPort(); } /**