Browse Source
Merge pull request #55289 from nextcloud/fix/noid/ignore-cache-if-not-setup
fix(ocm): ignore cache if not setup
pull/55320/head
Maxence Lange
1 week ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
5 additions and
3 deletions
-
lib/private/OCM/OCMDiscoveryService.php
|
|
@ -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]); |
|
|
|
} |
|
|
|