diff options
Diffstat (limited to 'lib/private/Updater')
-rw-r--r-- | lib/private/Updater/VersionCheck.php | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/private/Updater/VersionCheck.php b/lib/private/Updater/VersionCheck.php index ae3840a7fa5..3518f40bd4f 100644 --- a/lib/private/Updater/VersionCheck.php +++ b/lib/private/Updater/VersionCheck.php @@ -82,7 +82,12 @@ class VersionCheck { $url = $updaterUrl . '?version=' . $versionString; $tmp = []; - $xml = $this->getUrlContent($url); + try { + $xml = $this->getUrlContent($url); + } catch (\Exception $e) { + return false; + } + if ($xml) { $loadEntities = libxml_disable_entity_loader(true); $data = @simplexml_load_string($xml); @@ -108,16 +113,13 @@ class VersionCheck { /** * @codeCoverageIgnore * @param string $url - * @return bool|resource|string + * @return resource|string + * @throws \Exception */ protected function getUrlContent($url) { - try { - $client = $this->clientService->newClient(); - $response = $client->get($url); - return $response->getBody(); - } catch (\Exception $e) { - return false; - } + $client = $this->clientService->newClient(); + $response = $client->get($url); + return $response->getBody(); } } |