Skip to content

Commit 88aaf33

Browse files
marcelklehrbackportbot[bot]
authored andcommitted
fix(TaskProcessing): Make sure list command int filter parameters are parsed as ints
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
1 parent c609dd2 commit 88aaf33

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/Command/TaskProcessing/ListCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ protected function configure() {
5151
'status',
5252
's',
5353
InputOption::VALUE_OPTIONAL,
54-
'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)'
54+
'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)',
5555
)
5656
->addOption(
5757
'scheduledAfter',
@@ -78,9 +78,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
7878
$type = $input->getOption('type');
7979
$appId = $input->getOption('appId');
8080
$customId = $input->getOption('customId');
81-
$status = $input->getOption('status');
82-
$scheduledAfter = $input->getOption('scheduledAfter');
83-
$endedBefore = $input->getOption('endedBefore');
81+
$status = $input->getOption('status') !== null ? (int)$input->getOption('status') : null;
82+
$scheduledAfter = $input->getOption('scheduledAfter') != null ? (int)$input->getOption('scheduledAfter') : null;
83+
$endedBefore = $input->getOption('endedBefore') !== null ? (int)$input->getOption('endedBefore') : null;
8484

8585
$tasks = $this->taskProcessingManager->getTasks($userIdFilter, $type, $appId, $customId, $status, $scheduledAfter, $endedBefore);
8686
$arrayTasks = array_map(static function (Task $task) {

0 commit comments

Comments
 (0)