diff --git a/Classes/Task/EventQueueWorkerTaskAdditionalFieldProvider.php b/Classes/Task/EventQueueWorkerTaskAdditionalFieldProvider.php index c66a33e4f3..db51ee32f3 100644 --- a/Classes/Task/EventQueueWorkerTaskAdditionalFieldProvider.php +++ b/Classes/Task/EventQueueWorkerTaskAdditionalFieldProvider.php @@ -48,9 +48,12 @@ public function getAdditionalFields( /** @var EventQueueWorkerTask $task */ $additionalFields = []; - if (!$task instanceof EventQueueWorkerTask) { + if ($task !== null && !($task instanceof EventQueueWorkerTask)) { return $additionalFields; } + if ($schedulerModule->getCurrentAction()->equals(Action::ADD)) { + $taskInfo['solr_eventqueueworkertask_limit'] = EventQueueWorkerTask::DEFAULT_PROCESSING_LIMIT; + } if ($schedulerModule->getCurrentAction()->equals(Action::EDIT)) { $taskInfo['solr_eventqueueworkertask_limit'] = $task->getLimit(); @@ -95,6 +98,6 @@ public function saveAdditionalFields( return; } - $task->setLimit($submittedData['solr_eventqueueworkertask_limit']); + $task->setLimit((int)$submittedData['solr_eventqueueworkertask_limit']); } }