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

Set the driver argument for getDSN to null by default #798

Merged
merged 4 commits into from
Jun 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/functional/pdo_sqlsrv/MsCommon_mid-refactor.inc
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function connect($keywords = '', $options=array(), $errmode = PDO::ERRMODE_EXCEP
* @param bool $disableCE : flag for disabling column encryption even when keystore is NOT none
* @return string dsn string used for PDO constructor
*/
function getDSN($sqlsrvserver, $database, $driver, $keywords = '', $disableCE = false)
function getDSN($sqlsrvserver, $database, $driver = null, $keywords = '', $disableCE = false)
{
require("MsSetup.inc");
$dsn = "";
Expand All @@ -85,7 +85,7 @@ function getDSN($sqlsrvserver, $database, $driver, $keywords = '', $disableCE =
if ($database) {
$dsn .= "database=$database;";
}
if ($driver) {
if (!is_null($driver)) {
$dsn .= "driver=$driver;";
}
if ($keystore != "none" && !$disableCE) {
Expand Down
2 changes: 1 addition & 1 deletion test/functional/sqlsrv/MsCommon.inc
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ function isLocaleSupported()
if (isWindows()) {
return true;
}
if (AE\isColEncrypted()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See odbc bug in vso 3908. This was to guard against running the locale tests when AE is enabled, and yet later I discovered the issue only occurs when data columns are encrypted.

if (AE\isDataEncrypted()) {
return false;
}
// now check ODBC version
Expand Down