From f984bb56429d560d784831cf2317b51f8463c242 Mon Sep 17 00:00:00 2001 From: Leo Date: Wed, 11 May 2016 07:22:50 +0800 Subject: [PATCH] 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 --- Command/DatabaseCreateCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Command/DatabaseCreateCommand.php b/Command/DatabaseCreateCommand.php index b9c739c..381a0a2 100644 --- a/Command/DatabaseCreateCommand.php +++ b/Command/DatabaseCreateCommand.php @@ -91,7 +91,7 @@ class DatabaseCreateCommand extends AbstractCommand $dbName = $this->parseDbName($config['dsn']); $config['dsn'] = preg_replace( - '#dbname='.$dbName.';?#', + '#;?dbname='.$dbName.';?#', '', $config['dsn'] );