mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
FIX: Only set MYSQL_ATTR_INIT_COMMAND when using mysql driver (fixes #8103)
This commit is contained in:
parent
1658fe7617
commit
66f57bd4da
@ -176,9 +176,11 @@ class PDOConnector extends DBConnector
|
||||
if (!isset($charset)) {
|
||||
$charset = $connCharset;
|
||||
}
|
||||
$options = array(
|
||||
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES ' . $charset . ' COLLATE ' . $connCollation
|
||||
);
|
||||
|
||||
$options = [];
|
||||
if ($parameters['driver'] === 'mysql') {
|
||||
$options[PDO::MYSQL_ATTR_INIT_COMMAND] = 'SET NAMES ' . $charset . ' COLLATE ' . $connCollation;
|
||||
}
|
||||
|
||||
// Set SSL options if they are defined
|
||||
if (array_key_exists('ssl_key', $parameters) &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user