Merge pull request #6668 from marc1706/ticket/17347-master

[ticket/17347] Fix psalm error for user delete by ID command
This commit is contained in:
Marc Alexander 2024-07-01 22:28:43 +02:00 committed by GitHub
commit 5ede9fb149
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,6 +19,7 @@ use phpbb\language\language;
use phpbb\log\log_interface; use phpbb\log\log_interface;
use phpbb\user; use phpbb\user;
use phpbb\user_loader; use phpbb\user_loader;
use Symfony\Component\Console\Helper\QuestionHelper;
use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputOption;
@ -192,6 +193,10 @@ class delete_id extends command
protected function interact(InputInterface $input, OutputInterface $output): void protected function interact(InputInterface $input, OutputInterface $output): void
{ {
$helper = $this->getHelper('question'); $helper = $this->getHelper('question');
if (!$helper instanceof QuestionHelper)
{
return;
}
$user_ids = $input->getArgument('user_ids'); $user_ids = $input->getArgument('user_ids');
if (count($user_ids) > 0) if (count($user_ids) > 0)