From ea4c30b5db95bc3eddcdf823eb76a1ef3a848400 Mon Sep 17 00:00:00 2001 From: Alexis Saettler Date: Mon, 16 Oct 2023 19:32:37 +0200 Subject: [PATCH] fix test --- app/Helpers/StorageHelper.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Helpers/StorageHelper.php b/app/Helpers/StorageHelper.php index 84cb0feb878..d33ca58a6ca 100644 --- a/app/Helpers/StorageHelper.php +++ b/app/Helpers/StorageHelper.php @@ -30,12 +30,12 @@ public static function canUploadFile(Account $account): bool */ public static function uploadcare(): array { - $signature = new Signature(config('services.uploadcare.private_key')); + $signature = config('services.uploadcare.private_key') != '' ? new Signature(config('services.uploadcare.private_key')) : null; return [ 'publicKey' => config('services.uploadcare.public_key'), - 'signature' => $signature->getSignature(), - 'expire' => $signature->getExpire()->getTimestamp(), + 'signature' => optional($signature)->getSignature(), + 'expire' => optional($signature)->getExpire()->getTimestamp(), ]; } }