Skip to content

Commit 18d298b

Browse files
authored
Merge pull request #14 from JSignPdf/bugfix/prevent-handle-invalid-output
Prevent handle invalid output
2 parents e29b53b + d9065c7 commit 18d298b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/Sign/JSignService.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ public function getVersion(JSignParam $params)
6262

6363
$command = "$java -jar $jSignPdf --version";
6464
\exec($command, $output);
65+
if (empty($output) || strpos($output[0], 'version') === false) {
66+
return '';
67+
}
6568
return explode('version ', $output[0])[1];
6669
}
6770

0 commit comments

Comments
 (0)