You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 25, 2022. It is now read-only.
Copy file name to clipboardexpand all lines: src/JasperPHP/JasperPHP.php
+6-3
Original file line number
Diff line number
Diff line change
@@ -161,7 +161,7 @@ public function output()
161
161
publicfunctionexecute($run_as_user = false)
162
162
{
163
163
if( $this->redirect_output && !$this->windows)
164
-
$this->the_command .= "> /dev/null 2>&1";
164
+
$this->the_command .= " 2>&1";
165
165
166
166
if( $this->background && !$this->windows )
167
167
$this->the_command .= " &";
@@ -174,9 +174,12 @@ public function execute($run_as_user = false)
174
174
175
175
exec($this->the_command, $output, $return_var);
176
176
177
-
if($return_var != 0)
177
+
if( $return_var != 0 && isset($output[0]) )
178
+
thrownew \Exception($output[0], 1);
179
+
180
+
elseif( $return_var != 0 )
178
181
thrownew \Exception("Your report has an error and couldn't be processed! Try to output the command using the function `output();` and run it manually in the console.", 1);
0 commit comments