diff --git a/lib/private/TextProcessing/Manager.php b/lib/private/TextProcessing/Manager.php index 34f0b4e7964c2..e62a794f228bd 100644 --- a/lib/private/TextProcessing/Manager.php +++ b/lib/private/TextProcessing/Manager.php @@ -287,7 +287,7 @@ public function getPreferredProviders(OCPTask $task): array { if ($provider instanceof IProviderWithId) { return $provider->getId() === $preferences[$task->getType()]; } - $provider::class === $preferences[$task->getType()]; + return $provider::class === $preferences[$task->getType()]; }))); if ($provider !== false) { $providers = array_filter($providers, fn ($p) => $p !== $provider); @@ -295,7 +295,6 @@ public function getPreferredProviders(OCPTask $task): array { } } } - $providers = array_values(array_filter($providers, fn (IProvider $provider) => $task->canUseProvider($provider))); - return $providers; + return array_values(array_filter($providers, fn (IProvider $provider) => $task->canUseProvider($provider))); } }