Commit 273bc3dc authored by beberlei's avatar beberlei

[2.0] Fix bug in detection of global Doctrine Cli Configuration finding the...

[2.0] Fix bug in detection of global Doctrine Cli Configuration finding the empty replacement configuration before the correct one.
parent b2cf2e20
...@@ -6,8 +6,8 @@ $classLoader = new \Doctrine\Common\ClassLoader('Doctrine'); ...@@ -6,8 +6,8 @@ $classLoader = new \Doctrine\Common\ClassLoader('Doctrine');
$classLoader->register(); $classLoader->register();
$configFile = getcwd() . DIRECTORY_SEPARATOR . 'cli-config.php'; $configFile = getcwd() . DIRECTORY_SEPARATOR . 'cli-config.php';
$configuration = new \Doctrine\Common\Cli\Configuration();
$configuration = null;
if (file_exists($configFile)) { if (file_exists($configFile)) {
if ( ! is_readable($configFile)) { if ( ! is_readable($configFile)) {
trigger_error( trigger_error(
...@@ -25,5 +25,7 @@ if (file_exists($configFile)) { ...@@ -25,5 +25,7 @@ if (file_exists($configFile)) {
} }
} }
$configuration = ($configuration) ?: new \Doctrine\Common\Cli\Configuration();
$cli = new \Doctrine\Common\Cli\CliController($configuration); $cli = new \Doctrine\Common\Cli\CliController($configuration);
$cli->run($_SERVER['argv']); $cli->run($_SERVER['argv']);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment