Skip to content

Commit 912fbbf

Browse files
committed
Revert "DatabaseExtension: better detection of single/multiple definitions" [Closes #219]
This reverts commit cadc1a6.
1 parent dfb79e3 commit 912fbbf

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/Bridges/DatabaseDI/DatabaseExtension.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,9 @@ public function __construct(bool $debugMode = false)
4242
public function loadConfiguration()
4343
{
4444
$configs = $this->getConfig();
45-
foreach ($configs as $k => $v) {
46-
if (is_scalar($v)) {
47-
$configs = ['default' => $configs];
48-
break;
49-
}
50-
}
45+
$configs = is_array(reset($configs))
46+
? $configs
47+
: ['default' => $configs];
5148

5249
$defaults = $this->databaseDefaults;
5350
$defaults['autowired'] = true;

0 commit comments

Comments
 (0)