Commit 4d486d45 authored by Benjamin Eberlei's avatar Benjamin Eberlei

Merge branch 'DBAL-760' into 2.4

parents 6f4294c3 a5581ee2
......@@ -45,6 +45,10 @@ class SQLSrvConnection implements \Doctrine\DBAL\Driver\Connection
*/
public function __construct($serverName, $connectionOptions)
{
if ( ! sqlsrv_configure('WarningsReturnAsErrors', 0)) {
throw SQLSrvException::fromSqlSrvErrors();
}
$this->conn = sqlsrv_connect($serverName, $connectionOptions);
if ( ! $this->conn) {
throw SQLSrvException::fromSqlSrvErrors();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment