Skip to content

Commit

Permalink
fixed PHP warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Mar 14, 2011
1 parent f5c2874 commit 346cc25
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DependencyInjection/DoctrineExtension.php
Expand Up @@ -61,7 +61,8 @@ protected function dbalLoad(array $config, ContainerBuilder $container)
$loader->load('dbal.xml');

if (empty ($config['default_connection'])) {
$config['default_connection'] = reset(array_keys($config['connections']));
$keys = array_keys($config['connections']);
$config['default_connection'] = reset($keys);
}

$container->setAlias('database_connection', sprintf('doctrine.dbal.%s_connection', $config['default_connection']));
Expand Down

0 comments on commit 346cc25

Please sign in to comment.