From 86f07de236f55cc4fd82e67fcba6b8742ce9f875 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Sun, 13 Nov 2022 22:38:25 -0300 Subject: [PATCH] Redirect stderr to stdout and prevent display error https://stackoverflow.com/questions/818255/what-does-21-mean --- src/Sign/JSignService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Sign/JSignService.php b/src/Sign/JSignService.php index 43bc3c1..4bf0bd8 100644 --- a/src/Sign/JSignService.php +++ b/src/Sign/JSignService.php @@ -60,7 +60,7 @@ public function getVersion(JSignParam $params) } $this->throwIf(!file_exists($jSignPdf), 'Jar of JSignPDF not found on path: '. $jSignPdf); - $command = "$java -jar $jSignPdf --version"; + $command = "$java -jar $jSignPdf --version 2>&1"; \exec($command, $output); if (empty($output) || strpos($output[0], 'version') === false) { return '';