diff --git a/phpBB/phpbb/console/command/user/add.php b/phpBB/phpbb/console/command/user/add.php index d26007dfb5..30ce1ff1d3 100644 --- a/phpBB/phpbb/console/command/user/add.php +++ b/phpBB/phpbb/console/command/user/add.php @@ -21,6 +21,7 @@ use phpbb\language\language; use phpbb\passwords\manager; use phpbb\user; use Symfony\Component\Console\Command\Command as symfony_command; +use Symfony\Component\Console\Helper\QuestionHelper; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; @@ -184,6 +185,10 @@ class add extends command protected function interact(InputInterface $input, OutputInterface $output) { $helper = $this->getHelper('question'); + if (!$helper instanceof QuestionHelper) + { + return; + } $this->data = array( 'username' => $input->getOption('username'), diff --git a/phpBB/phpbb/console/command/user/delete.php b/phpBB/phpbb/console/command/user/delete.php index acd360b57b..727de653f8 100644 --- a/phpBB/phpbb/console/command/user/delete.php +++ b/phpBB/phpbb/console/command/user/delete.php @@ -19,6 +19,7 @@ use phpbb\log\log_interface; use phpbb\user; use phpbb\user_loader; use Symfony\Component\Console\Command\Command as symfony_command; +use Symfony\Component\Console\Helper\QuestionHelper; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -151,6 +152,10 @@ class delete extends command protected function interact(InputInterface $input, OutputInterface $output) { $helper = $this->getHelper('question'); + if (!$helper instanceof QuestionHelper) + { + return; + } $question = new ConfirmationQuestion( $this->language->lang('CLI_USER_DELETE_CONFIRM', $input->getArgument('username')),