Skip to content
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

Merged

Conversation

johndalangin
Copy link
Contributor

Fixes ssl_cipher is undefined error when installing Silverstripe via CLI using MySQL PDOConnector

@@ -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');
Copy link
Contributor

@tractorcow tractorcow Aug 8, 2017

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.

Copy link
Contributor Author

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.

@johndalangin
Copy link
Contributor Author

@dhensby @tractorcow Bug Fix for #7258

@johndalangin johndalangin force-pushed the origin/7258-fix-pdoconnector-bug branch from 21b8603 to 1a4a006 Compare August 8, 2017 10:00
@johndalangin
Copy link
Contributor Author

@tractorcow Fixed. Retained the use of array_key_exists to be consistent with nearby lines' syntax. Let me know if you have edits.

@tractorcow tractorcow closed this Aug 8, 2017
@tractorcow
Copy link
Contributor

Can be merged on green.

@tractorcow tractorcow reopened this Aug 8, 2017
@johndalangin
Copy link
Contributor Author

@tractorcow Alright, thanks! Can you kindly take a look at #7254 when you have time? Thank you.

@tractorcow tractorcow merged commit d07dc2b into silverstripe:3 Aug 8, 2017
@johndalangin johndalangin deleted the origin/7258-fix-pdoconnector-bug branch August 8, 2017 11:47
@lerni lerni mentioned this pull request Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants