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

CRM-19699: PHP7 define DB_DSN_MODE for drush mysqli compat. #9472

Merged
merged 1 commit into from
Dec 2, 2016
Merged
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
7 changes: 7 additions & 0 deletions install/civicrm.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down