Skip to content

Commit

Permalink
MDL-65558 enrol_database: use , as port separator
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed May 10, 2019
1 parent 7991e30 commit 80d5636
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions enrol/database/tests/sync_test.php
Expand Up @@ -98,6 +98,13 @@ protected function init_enrol_database() {
case 'mssql':
set_config('dbtype', 'mssqlnative', 'enrol_database');
set_config('dbsybasequoting', '1', 'enrol_database');

// The native sqlsrv driver uses a comma as separator between host and port.
$dbhost = $CFG->dbhost;
if (!empty($dboptions['dbport'])) {
$dbhost .= ',' . $dboptions['dbport'];
}
set_config('dbhost', $dbhost, 'enrol_database');
break;

default:
Expand Down

0 comments on commit 80d5636

Please sign in to comment.