Commit 8e1997f9 authored by totten's avatar totten

CRM-20768 - Install UI - Distinguish host/port in IPv6

parent 6a511829
......@@ -563,8 +563,9 @@ class InstallRequirements {
*/
protected function connect($host, $username, $password, $database = '') {
$hostParts = explode(':', $host);
if (count($hostParts) > 1) {
list ($host, $port) = $hostParts;
if (count($hostParts) > 1 && strrpos($host, ']') !== strlen($host) - 1) {
$port = array_pop($hostParts);
$host = implode(':', $hostParts);
}
else {
$port = '';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment