Avoid php notice if the database configuration was not provided

This commit is contained in:
Maxime AILLOUD 2011-05-18 12:43:44 +02:00
commit ad23a1f7d7

View file

@ -310,7 +310,7 @@ EOT;
protected function checkConfiguration()
{
$parameters = $this->container->get('propel.configuration')->getParameters();
if (0 === count($parameters['datasources'])) {
if (!isset($parameters['datasources']) ||0 === count($parameters['datasources'])) {
throw new \RuntimeException('Propel should be configured (no database configuration found).');
}
}