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:
2436f78
)
CRM-19699: PHP7 define DB_DSN_MODE for drush mysqli compat.
author
Mathieu Lutfy
<mathieu@bidon.ca>
Wed, 30 Nov 2016 20:22:54 +0000
(15:22 -0500)
committer
Mathieu Lutfy
<mathieu@bidon.ca>
Wed, 30 Nov 2016 20:22:54 +0000
(15:22 -0500)
install/civicrm.php
patch
|
blob
|
blame
|
history
diff --git
a/install/civicrm.php
b/install/civicrm.php
index c23bf6020b4d364aef7ed6c7f6145dc5a964829a..1e6c0b2cdd497f3f4cfd31d9a7571b9835eddf00 100644
(file)
--- a/
install/civicrm.php
+++ b/
install/civicrm.php
@@
-147,6
+147,13
@@
function civicrm_source($dsn, $fileName, $lineMode = FALSE) {
require_once "$crmPath/packages/DB.php";
+ // CRM-19699 See also CRM_Core_DAO for PHP7 mysqli compatiblity.
+ // Duplicated here because this is not using CRM_Core_DAO directly
+ // and this function may be called directly from Drush.
+ if (!defined('DB_DSN_MODE')) {
+ define('DB_DSN_MODE', 'auto');
+ }
+
$db = DB::connect($dsn);
if (PEAR::isError($db)) {
die("Cannot open $dsn: " . $db->getMessage());