From: Tim Otten Date: Wed, 12 Oct 2016 21:12:43 +0000 (+0100) Subject: CRM-17917 - More fixes for D8 installer X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8c9bff7866eb8ec4335a0bac256d3ac3eff2f294;p=civicrm-core.git CRM-17917 - More fixes for D8 installer --- diff --git a/Civi/Install/Requirements.php b/Civi/Install/Requirements.php index fb601d7b54..5677d970a9 100644 --- a/Civi/Install/Requirements.php +++ b/Civi/Install/Requirements.php @@ -439,7 +439,8 @@ class Requirements { 'details' => 'MySQL thread_stack is OK', ); - $conn = @mysqli_connect($db_config['server'], $db_config['username'], $db_config['password']); + $host = isset($db_config['server']) ? $db_config['server'] : $db_config['host']; + $conn = @mysqli_connect($host, $db_config['username'], $db_config['password']); if (!$conn) { $results['severity'] = $this::REQUIREMENT_ERROR; $results['details'] = 'Could not connect to database'; @@ -480,7 +481,8 @@ class Requirements { 'details' => 'Can successfully lock and unlock tables', ); - $conn = @mysqli_connect($db_config['server'], $db_config['username'], $db_config['password']); + $host = isset($db_config['server']) ? $db_config['server'] : $db_config['host']; + $conn = @mysqli_connect($host, $db_config['username'], $db_config['password']); if (!$conn) { $results['severity'] = $this::REQUIREMENT_ERROR; $results['details'] = 'Could not connect to database';