mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -04:00
fix(ocm): ignore cache if not setup
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
This commit is contained in:
parent
45bcdeb887
commit
e6843d454a
1 changed files with 5 additions and 3 deletions
|
|
@ -83,9 +83,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