Skip to content

Commit

Permalink
fix: prevent error when user not found
Browse files Browse the repository at this point in the history
The account of identify method could be deleted and throw error, this
isn't good. With this property is possible to prevent the error

Signed-off-by: Vitor Mattos <[email protected]>
  • Loading branch information
vitormattos committed Jan 17, 2025
1 parent cf428ca commit 85df114
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/Service/FileService.php
Original file line number Diff line number Diff line change
Expand Up @@ -779,10 +779,12 @@ private function associateAllAndFormat(IUser $user, array $files, array $signers
if ($data['me']) {
$temp = array_map(function (IdentifyMethod $identifyMethodEntity) use ($signer): array {
$this->identifyMethodService->setCurrentIdentifyMethod($identifyMethodEntity);
$identifyMethod = $this->identifyMethodService->getInstanceOfIdentifyMethod(
$identifyMethodEntity->getIdentifierKey(),
$identifyMethodEntity->getIdentifierValue(),
);
$identifyMethod = $this->identifyMethodService
->setIsRequest(false)
->getInstanceOfIdentifyMethod(
$identifyMethodEntity->getIdentifierKey(),
$identifyMethodEntity->getIdentifierValue(),
);
$signatureMethods = $identifyMethod->getSignatureMethods();
$return = [];
foreach ($signatureMethods as $signatureMethod) {
Expand Down

0 comments on commit 85df114

Please sign in to comment.