Last code optimization before release.

This commit is contained in:
James Cole
2018-07-28 10:45:16 +02:00
parent d35470a79e
commit 0c7b652a70
42 changed files with 217 additions and 301 deletions

View File

@@ -29,6 +29,7 @@ use FireflyIII\Services\Github\Object\Release;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;
use Log;
use RuntimeException;
use SimpleXMLElement;
/**
@@ -55,10 +56,14 @@ class UpdateRequest implements GithubRequest
}
if (200 !== $res->getStatusCode()) {
throw new FireflyException(sprintf('Returned code %d, error: %s', $res->getStatusCode(), $res->getBody()->getContents()));
throw new FireflyException(sprintf('Returned code %d.', $res->getStatusCode()));
}
try {
$releaseXml = new SimpleXMLElement($res->getBody()->getContents(), LIBXML_NOCDATA);
} catch (RunTimeException $e) {
Log::error(sprintf('Could not get body from github updat result: %s', $e->getMessage()));
$releaseXml = new SimpleXMLElement('');
}
$releaseXml = new SimpleXMLElement($res->getBody()->getContents(), LIBXML_NOCDATA);
//fetch the products for each category
if (isset($releaseXml->entry)) {