Skip to content

Commit a6d9eef

Browse files
committed
Condition changed
Signed-off-by: Andrey Pyzhikov <[email protected]>
1 parent 7440f7b commit a6d9eef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

system/Database/SQLSRV/Connection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ public function connect(bool $persistent = false)
120120
unset($connection['UID'], $connection['PWD']);
121121
}
122122

123-
if (strpos($this->hostname, ',') === false) {
124-
$this->hostname = $this->port !== '' ? "{$this->hostname}, {$this->port}" : $this->hostname;
123+
if (strpos($this->hostname, ',') === false && $this->port !== '') {
124+
$this->hostname .= ', ' . $this->port;
125125
}
126126

127127
sqlsrv_configure('WarningsReturnAsErrors', 0);

0 commit comments

Comments
 (0)