Skip to content

Commit

Permalink
Prevent handle invalid output
Browse files Browse the repository at this point in the history
Signed-off-by: Vitor Mattos <vitor@php.rio>
  • Loading branch information
vitormattos committed Oct 22, 2022
1 parent e29b53b commit d9065c7
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 d9065c7

Please sign in to comment.