Skip to content

Commit 96543e6

Browse files
authored
Merge pull request #37039 from bembelimen/4.1/fix-pdo-scheduler-cli
Fix wrong type for ID in CLI scheduler run
2 parents 067194e + 98055e7 commit 96543e6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

administrator/components/com_scheduler/src/Model/TaskModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ public static function configureTaskGetterOptions(OptionsResolver $resolver): Op
554554
'includeCliExclusive' => true,
555555
]
556556
)
557-
->setAllowedTypes('id', 'int')
557+
->setAllowedTypes('id', 'numeric')
558558
->setAllowedTypes('allowDisabled', 'bool')
559559
->setAllowedTypes('bypassScheduling', 'bool')
560560
->setAllowedTypes('allowConcurrent', 'bool')

administrator/components/com_scheduler/src/Scheduler/Scheduler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ public function runTask(array $options): ?Task
112112
// ? Sure about inferring scheduling bypass?
113113
$task = $this->getTask(
114114
[
115-
'id' => $options['id'],
115+
'id' => (int) $options['id'],
116116
'allowDisabled' => $options['allowDisabled'],
117-
'bypassScheduling' => $options['id'] !== 0,
117+
'bypassScheduling' => (int) $options['id'] !== 0,
118118
'allowConcurrent' => $options['allowConcurrent'],
119119
'includeCliExclusive' => ($app->isClient('cli')),
120120
]
@@ -192,7 +192,7 @@ protected function configureTaskRunnerOptions(OptionsResolver $resolver): void
192192
'allowConcurrent' => false,
193193
]
194194
)
195-
->setAllowedTypes('id', 'int')
195+
->setAllowedTypes('id', 'numeric')
196196
->setAllowedTypes('allowDisabled', 'bool')
197197
->setAllowedTypes('allowConcurrent', 'bool');
198198
}

0 commit comments

Comments
 (0)