Skip to content
Snippets Groups Projects
Commit b61fecef authored by Thijs Kinkhorst's avatar Thijs Kinkhorst
Browse files

Bugfix: persistent overrides options (#1555)

Fix that persistent would override other database options.

Closes: #1546
(cherry picked from commit 36db7a60)
parent 8153eaef
No related branches found
No related tags found
No related merge requests found
...@@ -84,7 +84,7 @@ class Database ...@@ -84,7 +84,7 @@ class Database
{ {
$driverOptions = $config->getArray('database.driver_options', []); $driverOptions = $config->getArray('database.driver_options', []);
if ($config->getBoolean('database.persistent', true)) { if ($config->getBoolean('database.persistent', true)) {
$driverOptions = [PDO::ATTR_PERSISTENT => true]; $driverOptions[PDO::ATTR_PERSISTENT] = true;
} }
// connect to the master // connect to the master
...@@ -128,7 +128,7 @@ class Database ...@@ -128,7 +128,7 @@ class Database
'database.username' => $config->getString('database.username', null), 'database.username' => $config->getString('database.username', null),
'database.password' => $config->getString('database.password', null), 'database.password' => $config->getString('database.password', null),
'database.prefix' => $config->getString('database.prefix', ''), 'database.prefix' => $config->getString('database.prefix', ''),
'database.persistent' => $config->getBoolean('database.persistent', false), 'database.persistent' => $config->getBoolean('database.persistent', true),
], ],
'slaves' => $config->getArray('database.slaves', []), 'slaves' => $config->getArray('database.slaves', []),
]; ];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment