From 8e1997f986835383b4c76ce51a89d00ef7bb8770 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 23 Jun 2017 17:24:33 -0700 Subject: [PATCH] CRM-20768 - Install UI - Distinguish host/port in IPv6 --- install/index.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install/index.php b/install/index.php index f7d9c0bacf..1339a10d5f 100644 --- a/install/index.php +++ b/install/index.php @@ -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 = ''; -- 2.25.1