handle missing port
authordemeritcowboy <demeritcowboy@hotmail.com>
Wed, 6 Jan 2021 05:20:29 +0000 (00:20 -0500)
committerdemeritcowboy <demeritcowboy@hotmail.com>
Wed, 6 Jan 2021 14:36:20 +0000 (09:36 -0500)
setup/plugins/init/Drupal8.civi-setup.php

index 98586c695e0f89d5ca0eab75fbe6cc42201f30a9..f81b362a51ec1bf066db5bd2632149e1494f57fb 100644 (file)
@@ -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'],