From 8de4879b3ed04c9db576ee1ae5ce19c1669dfa19 Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Wed, 6 Jan 2021 00:20:29 -0500 Subject: [PATCH] handle missing port --- setup/plugins/init/Drupal8.civi-setup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/plugins/init/Drupal8.civi-setup.php b/setup/plugins/init/Drupal8.civi-setup.php index 98586c695e..f81b362a51 100644 --- a/setup/plugins/init/Drupal8.civi-setup.php +++ b/setup/plugins/init/Drupal8.civi-setup.php @@ -43,7 +43,7 @@ if (!defined('CIVI_SETUP')) { $ssl_params = \Civi\Setup\DrupalUtil::guessSslParams($connectionOptions); // @todo Does Drupal support unixsocket in config? Set 'server' => 'unix(/path/to/socket.sock)' $model->db = $model->cmsDb = array( - 'server' => \Civi\Setup\DbUtil::encodeHostPort($connectionOptions['host'], $connectionOptions['port'] ?: NULL), + 'server' => \Civi\Setup\DbUtil::encodeHostPort($connectionOptions['host'], $connectionOptions['port'] ?? NULL), 'username' => $connectionOptions['username'], 'password' => $connectionOptions['password'], 'database' => $connectionOptions['database'], -- 2.25.1