-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIX: PDOConnector ssl_cipher bug fixes #7258 #7259
FIX: PDOConnector ssl_cipher bug fixes #7258 #7259
Conversation
model/connect/PDOConnector.php
Outdated
@@ -181,7 +181,7 @@ public function connect($parameters, $selectDB = false) { | |||
} | |||
|
|||
// use default cipher if not provided | |||
$options[PDO::MYSQL_ATTR_SSL_CIPHER] = $parameters['ssl_cipher'] ?: Config::inst()->get('PDOConnector', 'ssl_cipher_default'); | |||
$options[PDO::MYSQL_ATTR_SSL_CIPHER] = array_key_exists($parameters['ssl_cipher']) ? $parameters['ssl_cipher'] : Config::inst()->get('PDOConnector', 'ssl_cipher_default'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use isset() or !empty(). array_key_exists takes two parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about that, will revise now.
@dhensby @tractorcow Bug Fix for #7258 |
21b8603
to
1a4a006
Compare
@tractorcow Fixed. Retained the use of |
Can be merged on green. |
@tractorcow Alright, thanks! Can you kindly take a look at #7254 when you have time? Thank you. |
Fixes
ssl_cipher is undefined error
when installing Silverstripe via CLI using MySQL PDOConnector