Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Added .' 2>&1' to the exec command. #70

Merged
merged 5 commits into from
Jun 29, 2017
Merged

Added .' 2>&1' to the exec command. #70

merged 5 commits into from
Jun 29, 2017

Conversation

ArtisanTinkerer
Copy link
Contributor

https://stackoverflow.com/questions/3099617/php-capturing-the-command-output

This allows the errors to be retrieved into the $output array.

@cossou
Copy link
Owner

cossou commented Jun 8, 2017

Hi @ArtisanTinkerer thanks for the PR.

I added some checks to the code. We had a similar feature but it was not working.

Do you spot any problem with that?

This is working for me now and I get the errors back.

```
 exec($this->the_command .' 2>&1' , $output, $return_var);
```

eg:

Parameter 'report_type_id' of type 'java.lang.Integer caused java.lang.NumberFormatException For input string: "ytreyytre"
@ArtisanTinkerer
Copy link
Contributor Author

ArtisanTinkerer commented Jun 8, 2017 via email

@cossou
Copy link
Owner

cossou commented Jun 8, 2017

Hi @ArtisanTinkerer it's in the previous lines (L164).

@ArtisanTinkerer
Copy link
Contributor Author

ArtisanTinkerer commented Jun 8, 2017 via email

@cossou
Copy link
Owner

cossou commented Jun 8, 2017

The /dev/null was the problem. I removed in a commit to your own repository.

Take a look at the commits tab.

regards

@ArtisanTinkerer
Copy link
Contributor Author

Looking good now.

@cossou cossou merged commit 2ed2c0c into cossou:master Jun 29, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants