1
0
mirror of synced 2025-03-21 15:33:51 +03:00

[2.0] Fixed incorrectly used variable for cli config

This commit is contained in:
jwage 2009-11-03 04:13:35 +00:00
parent d8bf040165
commit 37824abffe

View File

@ -325,19 +325,19 @@ class Cli
private function _initializeEntityManager(array $args, array &$taskArgs) private function _initializeEntityManager(array $args, array &$taskArgs)
{ {
// Initialize EntityManager // Initialize EntityManager
$configFile = ( ! isset($args['config'])) ? './cli-config.php' : $args['config']; $configFile = ( ! isset($taskArgs['config'])) ? './cli-config.php' : $taskArgs['config'];
if (file_exists($configFile)) { if (file_exists($configFile)) {
// Including configuration file // Including configuration file
require $configFile; require $configFile;
// Check existance of EntityManager // Check existance of EntityManager
if ( ! isset($em)) { if ( ! isset($em)) {
throw new \Doctrine\Common\DoctrineException( throw new \Doctrine\Common\DoctrineException(
'No EntityManager created in configuration' 'No EntityManager created in configuration'
); );
} }
// Check for gloal argument options here // Check for gloal argument options here
if (isset($globalArguments)) { if (isset($globalArguments)) {
// Merge arguments. Values specified via the CLI take preference. // Merge arguments. Values specified via the CLI take preference.