From f28344e13ef26d740f9f1184cefeccc2a1d2c088 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 50a694c1a6e..59ede7d2e1d 100644 --- a/core/Command/TaskProcessing/ListCommand.php +++ b/core/Command/TaskProcessing/ListCommand.php @@ -54,7 +54,7 @@ class ListCommand extends Base { '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 @@ class ListCommand extends Base { $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) {