mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge branch 'ssl_pdo_mysql' into 2.4
Merge pull request #1421 from mikescar/ssl_pdo_mysql Fixes #556
This commit is contained in:
commit
8913f4fc08
1 changed files with 7 additions and 1 deletions
|
@ -146,7 +146,13 @@ class Mysql extends DboSource {
|
|||
if (!empty($config['encoding'])) {
|
||||
$flags[PDO::MYSQL_ATTR_INIT_COMMAND] = 'SET NAMES ' . $config['encoding'];
|
||||
}
|
||||
|
||||
if (!empty($config['ssl_key']) && !empty($config['ssl_cert'])) {
|
||||
$flags[PDO::MYSQL_ATTR_SSL_KEY] = $config['ssl_key'];
|
||||
$flags[PDO::MYSQL_ATTR_SSL_CERT] = $config['ssl_cert'];
|
||||
}
|
||||
if (!empty($config['ssl_ca'])) {
|
||||
$flags[PDO::MYSQL_ATTR_SSL_CA] = $config['ssl_ca'];
|
||||
}
|
||||
if (empty($config['unix_socket'])) {
|
||||
$dsn = "mysql:host={$config['host']};port={$config['port']};dbname={$config['database']}";
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue