mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/16643] Fixes
PHPBB3-16643
This commit is contained in:
@@ -35,7 +35,7 @@ class connection_factory
|
||||
* @return Connection Doctrine DBAL connection.
|
||||
*
|
||||
* @throws runtime_exception If the database connection could not be established.
|
||||
* @throws InvalidArgumentException If $driver_name is not a valid phpBB database driver.
|
||||
* @throws InvalidArgumentException If the provided driver name is not a valid phpBB database driver.
|
||||
*/
|
||||
public static function get_connection(config_php_file $config) : Connection
|
||||
{
|
||||
@@ -69,7 +69,7 @@ class connection_factory
|
||||
* @return Connection Doctrine DBAL connection.
|
||||
*
|
||||
* @throws runtime_exception If the database connection could not be established.
|
||||
* @throws InvalidArgumentException If $driver_name is not a valid phpBB database driver.
|
||||
* @throws InvalidArgumentException If $driver is not a valid phpBB database driver.
|
||||
*/
|
||||
public static function get_connection_from_params(
|
||||
string $driver,
|
||||
|
@@ -41,23 +41,23 @@ trait driver_convertor
|
||||
case 'mssql_odbc':
|
||||
case 'mssqlnative':
|
||||
$name = 'pdo_sqlsrv';
|
||||
break;
|
||||
break;
|
||||
|
||||
case 'mysqli':
|
||||
$name = 'pdo_mysql';
|
||||
break;
|
||||
break;
|
||||
|
||||
case 'oracle':
|
||||
$name = 'oci8';
|
||||
break;
|
||||
break;
|
||||
|
||||
case 'postgres':
|
||||
$name = 'pdo_pgsql';
|
||||
break;
|
||||
break;
|
||||
|
||||
case 'sqlite3':
|
||||
$name = 'pdo_sqlite';
|
||||
break;
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new InvalidArgumentException('Invalid phpBB database driver provided: ' . $driver_name);
|
||||
|
Reference in New Issue
Block a user