remove the semicolon before dbname (#416)

A dsn like "mysql:host=localhost;dbname=foo"
After preg_replace, the dsn become "mysql:host=localhost;"
If we have additional setting "charset: utf8", the dsn will become "mysql:host=localhost;;charset=utf8", which make propel:database:create not working
This commit is contained in:
Leo 2016-05-11 07:22:50 +08:00 committed by Marc J. Schmidt
parent 95e4c804a4
commit f984bb5642

View file

@ -91,7 +91,7 @@ class DatabaseCreateCommand extends AbstractCommand
$dbName = $this->parseDbName($config['dsn']);
$config['dsn'] = preg_replace(
'#dbname='.$dbName.';?#',
'#;?dbname='.$dbName.';?#',
'',
$config['dsn']
);