Add imports for facades

This commit is contained in:
James Cole
2025-02-23 12:47:04 +01:00
parent 0086a0ddc8
commit f7ad9c56c8
43 changed files with 132 additions and 94 deletions

View File

@@ -32,6 +32,7 @@ use FireflyIII\Support\Repositories\UserGroup\UserGroupInterface;
use FireflyIII\Support\Repositories\UserGroup\UserGroupTrait;
use Illuminate\Contracts\Encryption\DecryptException;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Crypt;
use Illuminate\Support\Facades\Storage;
use League\Flysystem\UnableToDeleteFile;
@@ -73,7 +74,7 @@ class AttachmentRepository implements AttachmentRepositoryInterface, UserGroupIn
$encryptedContent = (string) $disk->get($file);
try {
$unencryptedContent = \Crypt::decrypt($encryptedContent); // verified
$unencryptedContent = Crypt::decrypt($encryptedContent); // verified
} catch (DecryptException $e) {
app('log')->debug(sprintf('Could not decrypt attachment #%d but this is fine: %s', $attachment->id, $e->getMessage()));
$unencryptedContent = $encryptedContent;