Skip to content

Commit

Permalink
Merge pull request #14 from JSignPdf/bugfix/prevent-handle-invalid-ou…
Browse files Browse the repository at this point in the history
…tput

Prevent handle invalid output
  • Loading branch information
jeidison authored Oct 27, 2022
2 parents e29b53b + d9065c7 commit 18d298b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Sign/JSignService.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ public function getVersion(JSignParam $params)

$command = "$java -jar $jSignPdf --version";
\exec($command, $output);
if (empty($output) || strpos($output[0], 'version') === false) {
return '';
}
return explode('version ', $output[0])[1];
}

Expand Down

0 comments on commit 18d298b

Please sign in to comment.