From 5e9c8a0ceaabb84a679bd56e7165a9e29fc3da71 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Thu, 5 Jun 2014 01:00:33 +0200 Subject: [PATCH] [ticket/12655] Don't try to restore the definition in the help PHPBB3-12655 --- phpBB/phpbb/console/application.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/phpBB/phpbb/console/application.php b/phpBB/phpbb/console/application.php index ff90a76a92..91d95b9a7b 100644 --- a/phpBB/phpbb/console/application.php +++ b/phpBB/phpbb/console/application.php @@ -13,6 +13,9 @@ namespace phpbb\console; +use Symfony\Component\Console\Input\ArgvInput; +use Symfony\Component\Console\Output\ConsoleOutput; +use Symfony\Component\Console\Output\ConsoleOutputInterface; use Symfony\Component\Console\Shell; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -60,11 +63,6 @@ class application extends \Symfony\Component\Console\Application return parent::getHelp(); } - // We store the definition to restore it later. - // Otherwise, in the shell mode the --shell option - // will be available for all command. - $definition_backup = $this->getDefinition(); - $this->getDefinition()->addOption(new InputOption( '--shell', '-s', @@ -72,10 +70,7 @@ class application extends \Symfony\Component\Console\Application $this->user->lang('CLI_DESCRIPTION_OPTION_SHELL') )); - $help_message = parent::getHelp(); - $this->setDefinition($definition_backup); - - return $help_message; + return parent::getHelp(); } /**