Thanks to visit codestin.com
Credit goes to github.com

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

Conversation

@mickby
Copy link
Contributor

@mickby mickby commented Jun 8, 2017

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"
@mickby
Copy link
Contributor Author

mickby commented Jun 8, 2017 via email

@cossou
Copy link
Owner

cossou commented Jun 8, 2017

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

@mickby
Copy link
Contributor Author

mickby 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

@mickby
Copy link
Contributor Author

mickby commented Jun 8, 2017

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

Development

Successfully merging this pull request may close these issues.

2 participants