Check if application exists

This commit is contained in:
Nicolas Le Goff
2014-09-10 20:40:32 +02:00
parent d2dd0d492f
commit 5994dba2dc
2 changed files with 12 additions and 9 deletions

View File

@@ -106,10 +106,12 @@ class module_console_systemUpgrade extends Command
$output->writeln("");
}
$command = $this->getApplication()->find('crossdomain:generate');
$command->run(new ArrayInput(array(
'command' => 'crossdomain:generate'
)), $output);
if (null !== $this->getApplication()) {
$command = $this->getApplication()->find('crossdomain:generate');
$command->run(new ArrayInput(array(
'command' => 'crossdomain:generate'
)), $output);
}
} else {
$output->write('<info>Canceled</info>', true);
}