diff --git a/src/ExtendedPdo.php b/src/ExtendedPdo.php index f5f4e957..18820e68 100644 --- a/src/ExtendedPdo.php +++ b/src/ExtendedPdo.php @@ -65,13 +65,6 @@ public function __construct( $options[PDO::ATTR_ERRMODE] = PDO::ERRMODE_EXCEPTION; } - // sqlsrv fails to connect when the error mode uses exceptions - $sqlsrvWarnEx = substr($dsn, 0, 7) == 'sqlsrv:' - && $options[PDO::ATTR_ERRMODE] == PDO::ERRMODE_EXCEPTION; - if ($sqlsrvWarnEx) { - $options[PDO::ATTR_ERRMODE] = PDO::ERRMODE_WARNING; - } - // retain the arguments for later $this->args = [ $dsn, diff --git a/tests/ExtendedPdoTest.php b/tests/ExtendedPdoTest.php index 2b3839c6..0faa9b24 100644 --- a/tests/ExtendedPdoTest.php +++ b/tests/ExtendedPdoTest.php @@ -672,14 +672,6 @@ public function testNoExportOfLoginCredentials() $this->assertContains('[4]=>array(0) {}', $data); } - public function testSqlsrvErrmodeWarning() - { - $pdo = new ExtendedPdo('sqlsrv:bogus'); - $data = $this->dump($pdo); - // options - $this->assertContains('[3]=>array(1) {[3]=>int(1)}', $data); - } - protected function dump($pdo) { ob_start();