mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Various bugfixes and code clean up.
This commit is contained in:
@@ -77,11 +77,12 @@ class AttachmentHelper implements AttachmentHelperInterface
|
||||
*/
|
||||
public function getAttachmentContent(Attachment $attachment): string
|
||||
{
|
||||
$content = '';
|
||||
|
||||
try {
|
||||
$content = Crypt::decrypt($this->uploadDisk->get(sprintf('at-%d.data', $attachment->id)));
|
||||
} catch (DecryptException|FileNotFoundException $e) {
|
||||
Log::error(sprintf('Could not decrypt data of attachment #%d: %s', $attachment->id, $e->getMessage()));
|
||||
$content = '';
|
||||
}
|
||||
|
||||
return $content;
|
||||
|
@@ -76,7 +76,8 @@ class Help implements HelpInterface
|
||||
$statusCode = $res->getStatusCode();
|
||||
$content = trim($res->getBody()->getContents());
|
||||
} catch (GuzzleException|Exception $e) {
|
||||
Log::error($e);
|
||||
Log::error($e->getMessage());
|
||||
Log::error($e->getTraceAsString());
|
||||
}
|
||||
|
||||
Log::debug(sprintf('Status code is %d', $statusCode));
|
||||
|
@@ -66,12 +66,12 @@ trait UpdateTrait
|
||||
/**
|
||||
* Parses the version check result in a human readable sentence.
|
||||
*
|
||||
* @param Release|null $release
|
||||
* @param int $versionCheck
|
||||
* @param Release|null $release
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function parseResult(Release $release = null, int $versionCheck): string
|
||||
public function parseResult(int $versionCheck, Release $release = null): string
|
||||
{
|
||||
$current = (string)config('firefly.version');
|
||||
$return = '';
|
||||
|
Reference in New Issue
Block a user