diff --git a/lib/Doctrine/Common/Cli/TaskNamespace.php b/lib/Doctrine/Common/Cli/TaskNamespace.php index b75cdec8f..43ba4ac7a 100644 --- a/lib/Doctrine/Common/Cli/TaskNamespace.php +++ b/lib/Doctrine/Common/Cli/TaskNamespace.php @@ -240,7 +240,7 @@ class TaskNamespace extends AbstractNamespace $printer->writeln($message, 'ERROR'); // Unable instantiate task or task is not valid - if ($task !== null) { + if (isset($task) && $task !== null) { $printer->write(PHP_EOL); $task->basicHelp(); // Fallback of not-valid task arguments }