mirror of
https://github.com/flarum/core.git
synced 2025-08-11 02:44:04 +02:00
DatabaseConfig: Implement Arrayable contract
This commit is contained in:
@@ -107,7 +107,7 @@ trait CreatesForum
|
||||
{
|
||||
return [
|
||||
'debug' => true,
|
||||
'database' => $this->getDatabaseConfiguration()->getConfig(),
|
||||
'database' => $this->getDatabaseConfiguration()->toArray(),
|
||||
'url' => 'http://flarum.local',
|
||||
'paths' => [
|
||||
'api' => 'api',
|
||||
@@ -122,7 +122,7 @@ trait CreatesForum
|
||||
return;
|
||||
}
|
||||
|
||||
$dbConfig = $this->getDatabaseConfiguration()->getConfig();
|
||||
$dbConfig = $this->getDatabaseConfiguration()->toArray();
|
||||
|
||||
$pdo = (new MySqlConnector)->connect($dbConfig);
|
||||
$db = new MySqlConnection($pdo, $dbConfig['database'], $dbConfig['prefix'], $dbConfig);
|
||||
|
Reference in New Issue
Block a user