mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/17176] Ensure helpers are of expected type
PHPBB3-17176
This commit is contained in:
@@ -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'),
|
||||
|
@@ -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')),
|
||||
|
Reference in New Issue
Block a user