From ae799c57c0d2477235644b092bb38fd2e37fd292 Mon Sep 17 00:00:00 2001 From: rxu Date: Fri, 11 Feb 2022 10:02:33 +0700 Subject: [PATCH] [ticket/16965] Allow empty value as default database server name on installing PHPBB3-16965 --- phpBB/phpbb/db/doctrine/connection_parameter_factory.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/phpbb/db/doctrine/connection_parameter_factory.php b/phpBB/phpbb/db/doctrine/connection_parameter_factory.php index bf0a18f5e8..4649bbde84 100644 --- a/phpBB/phpbb/db/doctrine/connection_parameter_factory.php +++ b/phpBB/phpbb/db/doctrine/connection_parameter_factory.php @@ -37,7 +37,7 @@ class connection_parameter_factory */ public static function get_configuration( string $driver, - string $host, + ?string $host = null, ?string $user = null, ?string $password = null, ?string $name = null, @@ -73,7 +73,7 @@ class connection_parameter_factory */ private static function build_connection_parameters( array $params, - string $host, + ?string $host = null, ?string $user = null, ?string $password = null, ?string $name = null, @@ -86,7 +86,7 @@ class connection_parameter_factory ); } - if (empty($host) || empty($user) || empty($name)) + if (empty($user) || empty($name)) { throw new InvalidArgumentException('Required database parameter is not set.'); }