projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
83a0fa0
)
dev/core#2726 - Set ssl option when using DSN with SSL
author
Erawat Chamanont
<erawat@gmail.com>
Thu, 29 Jul 2021 20:25:40 +0000
(21:25 +0100)
committer
Erawat Chamanont
<erawat@gmail.com>
Thu, 29 Jul 2021 20:25:40 +0000
(21:25 +0100)
CRM/Utils/File.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Utils/File.php
b/CRM/Utils/File.php
index 79bbbd4dfc62eb4fd8005cbc19360eceb8210ad1..d50ee48d770d78fdc48a535cf27d0577af5579b7 100644
(file)
--- a/
CRM/Utils/File.php
+++ b/
CRM/Utils/File.php
@@
-327,7
+327,8
@@
class CRM_Utils_File {
require_once 'DB.php';
$dsn = CRM_Utils_SQL::autoSwitchDSN($dsn);
try {
- $db = DB::connect($dsn);
+ $options = CRM_Utils_SQL::isSSLDSN($dsn) ? ['ssl' => TRUE] : [];
+ $db = DB::connect($dsn, $options);
}
catch (Exception $e) {
die("Cannot open $dsn: " . $e->getMessage());