Skip to content

Commit

Permalink
fix: prevent error when have not identify method
Browse files Browse the repository at this point in the history
Signed-off-by: Vitor Mattos <[email protected]>
  • Loading branch information
vitormattos committed Jan 15, 2025
1 parent 8d8f206 commit aa795f5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Service/RequestSignatureService.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ private function associateToSigners(array $data, int $fileId): array {

private function associateToSigner(array $identifyMethods, string $displayName, string $description, bool $notify, int $fileId): SignRequestEntity {
$identifyMethodsIncances = $this->identifyMethod->getByUserData($identifyMethods);
if (empty($identifyMethodsIncances)) {
throw new \Exception($this->l10n->t('Invalid identification method'));
}
$signRequest = $this->getSignRequestByIdentifyMethod(
current($identifyMethodsIncances),
$fileId
Expand Down

0 comments on commit aa795f5

Please sign in to comment.