From: Marcel Klehr Date: Fri, 30 Aug 2024 07:59:58 +0000 (+0200) Subject: fix(TextProcessing): Don't run taskProcessing if task type is not available X-Git-Tag: v30.0.0rc4~38^2~4 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0bd839f5ae04f76216cd83e6fb7f23fce42236e1;p=nextcloud-server.git fix(TextProcessing): Don't run taskProcessing if task type is not available Signed-off-by: Marcel Klehr Signed-off-by: Julien Veyssier --- diff --git a/lib/private/TextProcessing/Manager.php b/lib/private/TextProcessing/Manager.php index 312efb29005..81a8f59c955 100644 --- a/lib/private/TextProcessing/Manager.php +++ b/lib/private/TextProcessing/Manager.php @@ -116,7 +116,7 @@ class Manager implements IManager { SummaryTaskType::class => TextToTextSummary::ID, TopicsTaskType::class => TextToTextTopics::ID, ]; - if (isset($taskProcessingCompatibleTaskTypes[$taskTypeClass])) { + if (isset($taskProcessingCompatibleTaskTypes[$taskTypeClass]) && isset($this->taskProcessingManager->getAvailableTaskTypes()[$taskProcessingCompatibleTaskTypes[$taskTypeClass]])) { try { $taskProcessingTaskTypeId = $taskProcessingCompatibleTaskTypes[$taskTypeClass]; $taskProcessingTask = new \OCP\TaskProcessing\Task(