From 6ae009796df142d6d56bbb0f406436befd1f2265 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Mon, 6 Oct 2025 15:29:36 +0200 Subject: [PATCH] fix(TaskProcessing): Make sure list command int filter parameters are parsed as ints Signed-off-by: Marcel Klehr --- core/Command/TaskProcessing/ListCommand.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/Command/TaskProcessing/ListCommand.php b/core/Command/TaskProcessing/ListCommand.php index f4ea76729d926..35d518a24d557 100644 --- a/core/Command/TaskProcessing/ListCommand.php +++ b/core/Command/TaskProcessing/ListCommand.php @@ -51,7 +51,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', @@ -78,9 +78,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) {