mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix: Don't try to access undefined array key
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
parent
5704281276
commit
017f136059
1 changed files with 5 additions and 1 deletions
|
|
@ -158,7 +158,11 @@ class Manager implements IManager {
|
|||
throw new PreConditionNotMetException('No LanguageModel provider is installed that can handle this task');
|
||||
}
|
||||
$task->setStatus(OCPTask::STATUS_SCHEDULED);
|
||||
[$provider,] = $this->getPreferredProviders($task);
|
||||
$providers = $this->getPreferredProviders($task);
|
||||
if (count($providers) === 0) {
|
||||
throw new PreConditionNotMetException('No LanguageModel provider is installed that can handle this task');
|
||||
}
|
||||
[$provider,] = $providers;
|
||||
if ($provider instanceof IProviderWithExpectedRuntime) {
|
||||
$completionExpectedAt = new \DateTime('now');
|
||||
$completionExpectedAt->add(new \DateInterval('PT'.$provider->getExpectedRuntime().'S'));
|
||||
|
|
|
|||
Loading…
Reference in a new issue