DbConnection: Fix "Driver does not support setting attributes" for the pdolib extension

fixes #12640
This commit is contained in:
Eric Lippmann 2017-07-11 17:15:25 +02:00
parent f02d631aa1
commit 3e743a8799
1 changed files with 8 additions and 1 deletions

View File

@ -139,7 +139,14 @@ class DbConnection implements Selectable, Extensible, Updatable, Reducible, Insp
switch ($this->dbType) {
case 'mssql':
$adapter = 'Pdo_Mssql';
$adapterParamaters['pdoType'] = $this->config->get('pdoType', 'dblib');
$pdoType = $this->config->get('pdoType', 'dblib');
if ($pdoType === 'dblib') {
// Driver does not support setting attributes
unset($adapterParamaters['persistent']);
unset($adapterParamaters['options']);
unset($adapterParamaters['driver_options']);
}
$adapterParamaters['pdoType'] = $pdoType;
$defaultPort = 1433;
break;
case 'mysql':