mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
Merge pull request #6366 from rxu/ticket/16965
[ticket/16965] Allow empty value as default database server name on installing
This commit is contained in:
commit
661b9192ad
1 changed files with 5 additions and 5 deletions
|
@ -25,7 +25,7 @@ class connection_parameter_factory
|
|||
* Returns configuration options for Doctrine DBAL.
|
||||
*
|
||||
* @param string $driver Driver name.
|
||||
* @param string $host Hostname.
|
||||
* @param string|null $host Hostname.
|
||||
* @param string|null $user Username.
|
||||
* @param string|null $password Password.
|
||||
* @param string|null $name Database name.
|
||||
|
@ -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,
|
||||
|
@ -61,7 +61,7 @@ class connection_parameter_factory
|
|||
* Build Doctrine configuration array.
|
||||
*
|
||||
* @param array $params Parameter array.
|
||||
* @param string $host Database hostname.
|
||||
* @param string|null $host Database hostname.
|
||||
* @param string|null $user Username.
|
||||
* @param string|null $password Password.
|
||||
* @param string|null $name Database name.
|
||||
|
@ -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.');
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue