Skip to content

Commit

Permalink
Merge pull request #18 from seamuslee001/mysqli_fix
Browse files Browse the repository at this point in the history
Port fix from drupal mysqli cannot install if using default port
  • Loading branch information
totten authored Sep 25, 2016
2 parents 34d20da + a26bd36 commit df20911
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drush/civicrm.drush.inc
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ function _civicrm_install_db($dbuser, $dbpass, $dbhost, $dbname,

if (function_exists('mysqli_connect')) {
$dbhostParts = explode(':', $dbhost);
$conn = @mysqli_connect($dbhostParts[0], $dbuser, $dbpass, '', isset($dbhostParts[1]) ? $dbhostParts[1] : '');
$conn = @mysqli_connect($dbhostParts[0], $dbuser, $dbpass, '', isset($dbhostParts[1]) ? $dbhostParts[1] : NULL);
$dbOK = ($a = @mysqli_select_db($conn, $dbname)) || ($b = @mysqli_query($conn, "CREATE DATABASE $dbname"));
}
elseif (function_exists('mysql_connect')) {
Expand Down

0 comments on commit df20911

Please sign in to comment.