diff --git a/Command/AbstractCommand.php b/Command/AbstractCommand.php index 2b48272..4bd4953 100644 --- a/Command/AbstractCommand.php +++ b/Command/AbstractCommand.php @@ -383,6 +383,10 @@ EOT $propelConfiguration = $container->get('propel.configuration'); foreach ($propelConfiguration['datasources'] as $name => $datasource) { + if (is_scalar($datasource)) { + continue; + } + $xml .= strtr(<< %adapter% diff --git a/Command/SqlInsertCommand.php b/Command/SqlInsertCommand.php index d2d930e..ce8546f 100644 --- a/Command/SqlInsertCommand.php +++ b/Command/SqlInsertCommand.php @@ -111,6 +111,10 @@ EOT $connections = array(); foreach ($propelConfiguration['datasources'] as $name => $config) { + if (is_scalar($config)) { + continue; + } + $connections[$name] = $config['connection']; } diff --git a/DependencyInjection/PropelExtension.php b/DependencyInjection/PropelExtension.php index 22b31e6..c41afc5 100644 --- a/DependencyInjection/PropelExtension.php +++ b/DependencyInjection/PropelExtension.php @@ -126,7 +126,7 @@ class PropelExtension extends Extension // Alias the default connection if not defined if (!isset($c['datasources']['default'])) { - $c['datasources']['default'] = $c['datasources'][$connectionName]; + $c['datasources']['default'] = $connectionName; } $container->getDefinition('propel.configuration')->setArguments(array($c));