mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 08:05:53 +02:00
BUGFIX Stop sqlsrv warnings from being returned as errors to keep it in line with mssql functions
This commit is contained in:
parent
84aed0d9c3
commit
a37fd93c37
@ -83,6 +83,11 @@ class MSSQLDatabase extends SS_Database {
|
|||||||
if($this->mssql) {
|
if($this->mssql) {
|
||||||
$this->dbConn = mssql_connect($parameters['server'], $parameters['username'], $parameters['password'], true);
|
$this->dbConn = mssql_connect($parameters['server'], $parameters['username'], $parameters['password'], true);
|
||||||
} else {
|
} else {
|
||||||
|
// Disable default warnings as errors behaviour for sqlsrv to keep it in line with mssql functions
|
||||||
|
if(ini_get('sqlsrv.WarningsReturnAsErrors')) {
|
||||||
|
ini_set('sqlsrv.WarningsReturnAsErrors', 'Off');
|
||||||
|
}
|
||||||
|
|
||||||
// Windows authentication doesn't require a username and password
|
// Windows authentication doesn't require a username and password
|
||||||
if(defined('MSSQL_USE_WINDOWS_AUTHENTICATION') && MSSQL_USE_WINDOWS_AUTHENTICATION == true) {
|
if(defined('MSSQL_USE_WINDOWS_AUTHENTICATION') && MSSQL_USE_WINDOWS_AUTHENTICATION == true) {
|
||||||
$connectionInfo = array();
|
$connectionInfo = array();
|
||||||
|
Loading…
Reference in New Issue
Block a user