Skip to content

Commit d918db1

Browse files
Merge pull request #4812 from LibreSign/fix/prevent-error-when-pdfsig-output-is-empty
fix: prevent error when output of pdfsig is empty
2 parents 8eb2a43 + f846d50 commit d918db1

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/Handler/Pkcs12Handler.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ private function popplerUtilsPdfSignFallback($resource, int $signerCounter): arr
202202
file_put_contents($tempFile, $content);
203203

204204
$content = shell_exec('pdfsig ' . $tempFile);
205+
if (empty($content)) {
206+
return [];
207+
}
205208
$lines = explode("\n", $content);
206209

207210
$lastSignature = 0;

0 commit comments

Comments
 (0)