check propel.ini existence

if propel.ini file doesn't exists, the parse_ini file will fire a
warning.
This commit is contained in:
Pierre Tachoire 2013-11-18 22:28:55 +01:00
commit 4d0b86f5e7

View file

@ -321,10 +321,15 @@ EOT;
{
$fs = new Filesystem();
$buildProperties = array_merge(
parse_ini_file($kernel->getRootDir().'/config/propel.ini'),
$this->getContainer()->getParameter('propel.build_properties')
);
$buildProperties = $this->getContainer()->getParameter('propel.build_properties');
$inifile = $kernel->getRootDir().'/config/propel.ini';
if (file_exists($inifile)) {
$buildProperties = array_merge(
parse_ini_file($inifile),
$buildProperties
);
}
$fs->dumpFile($file, $this->arrayToIni($buildProperties));
}