DbConnection: Fix "Driver does not support setting attributes" for the pdolib extension
fixes #12640
This commit is contained in:
parent
f02d631aa1
commit
3e743a8799
|
@ -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':
|
||||
|
|
Loading…
Reference in New Issue