mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
Merge pull request #55289 from nextcloud/fix/noid/ignore-cache-if-not-setup
fix(ocm): ignore cache if not setup
This commit is contained in:
commit
b08117a9e7
1 changed files with 5 additions and 3 deletions
|
|
@ -84,9 +84,11 @@ class OCMDiscoveryService implements IOCMDiscoveryService {
|
|||
throw new OCMProviderException('Previous discovery failed.');
|
||||
}
|
||||
|
||||
$provider->import(json_decode($cached ?? '', true, 8, JSON_THROW_ON_ERROR) ?? []);
|
||||
$this->remoteProviders[$remote] = $provider;
|
||||
return $provider;
|
||||
if ($cached !== null) {
|
||||
$provider->import(json_decode($cached, true, 8, JSON_THROW_ON_ERROR) ?? []);
|
||||
$this->remoteProviders[$remote] = $provider;
|
||||
return $provider;
|
||||
}
|
||||
} catch (JsonException|OCMProviderException $e) {
|
||||
$this->logger->warning('cache issue on ocm discovery', ['exception' => $e]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue