mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
lib/DbConnection: Use isset for charset check
This commit is contained in:
parent
ea871ea032
commit
98934e9c5f
@ -153,7 +153,7 @@ class DbConnection implements Selectable, Extensible, Updatable, Reducible, Insp
|
|||||||
$driverOptions[PDO::MYSQL_ATTR_INIT_COMMAND] =
|
$driverOptions[PDO::MYSQL_ATTR_INIT_COMMAND] =
|
||||||
'SET SESSION SQL_MODE=\'STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,'
|
'SET SESSION SQL_MODE=\'STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,'
|
||||||
. 'NO_AUTO_CREATE_USER,ANSI_QUOTES,PIPES_AS_CONCAT,NO_ENGINE_SUBSTITUTION\'';
|
. 'NO_AUTO_CREATE_USER,ANSI_QUOTES,PIPES_AS_CONCAT,NO_ENGINE_SUBSTITUTION\'';
|
||||||
if (array_key_exists('charset', $adapterParamaters) && $adapterParamaters['charset']) {
|
if (isset($adapterParamaters['charset'])) {
|
||||||
$driverOptions[PDO::MYSQL_ATTR_INIT_COMMAND] .= ', NAMES ' . $adapterParamaters['charset'];
|
$driverOptions[PDO::MYSQL_ATTR_INIT_COMMAND] .= ', NAMES ' . $adapterParamaters['charset'];
|
||||||
unset($adapterParamaters['charset']);
|
unset($adapterParamaters['charset']);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user