From 273bc3dc22d1329ceda9a03987590e27d6f1df32 Mon Sep 17 00:00:00 2001 From: beberlei Date: Wed, 10 Mar 2010 19:07:02 +0000 Subject: [PATCH] [2.0] Fix bug in detection of global Doctrine Cli Configuration finding the empty replacement configuration before the correct one. --- bin/doctrine.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/doctrine.php b/bin/doctrine.php index 0c46cac26..b6080bdd9 100644 --- a/bin/doctrine.php +++ b/bin/doctrine.php @@ -6,8 +6,8 @@ $classLoader = new \Doctrine\Common\ClassLoader('Doctrine'); $classLoader->register(); $configFile = getcwd() . DIRECTORY_SEPARATOR . 'cli-config.php'; -$configuration = new \Doctrine\Common\Cli\Configuration(); +$configuration = null; if (file_exists($configFile)) { if ( ! is_readable($configFile)) { trigger_error( @@ -25,5 +25,7 @@ if (file_exists($configFile)) { } } +$configuration = ($configuration) ?: new \Doctrine\Common\Cli\Configuration(); + $cli = new \Doctrine\Common\Cli\CliController($configuration); $cli->run($_SERVER['argv']); \ No newline at end of file