Insert charset parameter in the buildtime file in ordre to deal with UTF8 data
This commit is contained in:
parent
102e688f5b
commit
49abcb9161
|
@ -203,6 +203,7 @@ EOT
|
|||
<dsn>%dsn%</dsn>
|
||||
<user>%username%</user>
|
||||
<password>%password%</password>
|
||||
<charset>%charset%</charset>
|
||||
</connection>
|
||||
<settings>
|
||||
<setting id="charset">%charset%</setting>
|
||||
|
@ -216,7 +217,7 @@ EOT
|
|||
'%dsn%' => $datasource['connection']['dsn'],
|
||||
'%username%' => $datasource['connection']['user'],
|
||||
'%password%' => $datasource['connection']['password'],
|
||||
'%charset%' => $container->getParameter('propel.charset'),
|
||||
'%charset%' => $datasource['connection']['settings']['charset']['value'],
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -332,8 +333,9 @@ EOT;
|
|||
*/
|
||||
protected function checkConfiguration()
|
||||
{
|
||||
$parameters = $this->getContainer()->get('propel.configuration')->getParameters();
|
||||
if (!isset($parameters['datasources']) ||0 === count($parameters['datasources'])) {
|
||||
$parameters = $this->container->get('propel.configuration')->getParameters();
|
||||
|
||||
if (!isset($parameters['datasources']) || 0 === count($parameters['datasources'])) {
|
||||
throw new \RuntimeException('Propel should be configured (no database configuration found).');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue