From 65383d04e7cb802339102b4c49b37073334c965f Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 15 Nov 2024 15:37:30 -0300 Subject: [PATCH] chore: feedback improvement Signed-off-by: Vitor Mattos --- lib/Service/SignFileService.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Service/SignFileService.php b/lib/Service/SignFileService.php index 4577ae15c2..eea81914a0 100644 --- a/lib/Service/SignFileService.php +++ b/lib/Service/SignFileService.php @@ -587,6 +587,9 @@ private function getPdfToSign(FileEntity $fileData, File $originalFile): File { $pdf->addFile($dest); $buffer = $pdf->stamp($background) ->toString(); + if (!is_string($buffer)) { + throw new LibresignException('Failed to merge the PDF with the footer. The PDF was not successfully created with the footer.'); + } } else { $buffer = $originalFile->getContent(); }