diff --git a/core/Command/TaskProcessing/Cleanup.php b/core/Command/TaskProcessing/Cleanup.php index 7a1b1bea5a73a..b032bf898f945 100644 --- a/core/Command/TaskProcessing/Cleanup.php +++ b/core/Command/TaskProcessing/Cleanup.php @@ -46,7 +46,7 @@ protected function configure() { } protected function execute(InputInterface $input, OutputInterface $output): int { - $maxAgeSeconds = $input->getArgument('maxAgeSeconds') ?? Manager::MAX_TASK_AGE_SECONDS; + $maxAgeSeconds = (int)($input->getArgument('maxAgeSeconds') ?? Manager::MAX_TASK_AGE_SECONDS); $output->writeln('Cleanup up tasks older than ' . $maxAgeSeconds . ' seconds and the related output files'); $taskIdsToCleanup = []; diff --git a/core/Command/TaskProcessing/Statistics.php b/core/Command/TaskProcessing/Statistics.php index 6aa4cd5bf5220..84aaf81265197 100644 --- a/core/Command/TaskProcessing/Statistics.php +++ b/core/Command/TaskProcessing/Statistics.php @@ -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);