mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
DbConnection: Fix "Driver does not support setting attributes" for the pdolib extension
fixes #2545 (cherry picked from commit f25420f45874da1fdd49bd6ed2221af8b77473c3) Signed-off-by: Eric Lippmann <eric.lippmann@icinga.com>
This commit is contained in:
parent
b6a3604086
commit
75291386b2
@ -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…
x
Reference in New Issue
Block a user