diff --git a/core/Command/TaskProcessing/ListCommand.php b/core/Command/TaskProcessing/ListCommand.php index 50a694c1a6ef9..59ede7d2e1ded 100644 --- a/core/Command/TaskProcessing/ListCommand.php +++ b/core/Command/TaskProcessing/ListCommand.php @@ -54,7 +54,7 @@ protected function configure() { 'status', 's', InputOption::VALUE_OPTIONAL, - 'only get the tasks that have a specific status (STATUS_UNKNOWN=0, STATUS_SCHEDULED=1, STATUS_RUNNING=2, STATUS_SUCCESSFUL=3, STATUS_FAILED=4, STATUS_CANCELLED=5)' + 'only get the tasks that have a specific status (STATUS_UNKNOWN=0, STATUS_SCHEDULED=1, STATUS_RUNNING=2, STATUS_SUCCESSFUL=3, STATUS_FAILED=4, STATUS_CANCELLED=5)', ) ->addOption( 'scheduledAfter', @@ -81,9 +81,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int $type = $input->getOption('type'); $appId = $input->getOption('appId'); $customId = $input->getOption('customId'); - $status = $input->getOption('status'); - $scheduledAfter = $input->getOption('scheduledAfter'); - $endedBefore = $input->getOption('endedBefore'); + $status = $input->getOption('status') !== null ? (int)$input->getOption('status') : null; + $scheduledAfter = $input->getOption('scheduledAfter') != null ? (int)$input->getOption('scheduledAfter') : null; + $endedBefore = $input->getOption('endedBefore') !== null ? (int)$input->getOption('endedBefore') : null; $tasks = $this->taskProcessingManager->getTasks($userIdFilter, $type, $appId, $customId, $status, $scheduledAfter, $endedBefore); $arrayTasks = array_map(static function (Task $task) {