Merge pull request #6036 from iRedds/fix-sqlsrv-port

Bug: The SQLSRV driver ignores the port value from the config.
This commit is contained in:
kenjis 2022-05-27 15:32:51 +09:00 committed by GitHub
commit 7b42a1230e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -120,6 +120,10 @@ class Connection extends BaseConnection
unset($connection['UID'], $connection['PWD']);
}
if (strpos($this->hostname, ',') === false && $this->port !== '') {
$this->hostname .= ', ' . $this->port;
}
sqlsrv_configure('WarningsReturnAsErrors', 0);
$this->connID = sqlsrv_connect($this->hostname, $connection);

View File

@ -119,5 +119,6 @@ Deprecations
Bugs Fixed
**********
- The SQLSRV driver ignores the port value from the config.
See the repo's `CHANGELOG.md <https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md>`_ for a complete list of bugs fixed.