Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect __toString behavior in exception #6

Open
Mihailoff opened this issue Oct 25, 2014 · 5 comments
Open

Incorrect __toString behavior in exception #6

Mihailoff opened this issue Oct 25, 2014 · 5 comments

Comments

@Mihailoff
Copy link
Contributor

https://github.com/MrRio/shellwrap/blob/0.4.1/src/MrRio/ShellWrap.php#L41

Causes Warning: MrRio\ShellWrapException::__toString() must return a string in Unknown on line 0

@MrRio
Copy link
Owner

MrRio commented Oct 25, 2014

Do you have some example code that produces this error?

@Mihailoff
Copy link
Contributor Author

$sh = new sh();
echo $sh('bin/tool info');

PHP Warning:  MrRio\ShellWrapException::__toString() must return a string in Unknown on line 0
PHP Fatal error:  Uncaught thrown in app/vendor/mrrio/shellwrap/src/MrRio/ShellWrap.php on line 180

Mihailoff added a commit to Mihailoff/shellwrap that referenced this issue Oct 28, 2014
@Mihailoff Mihailoff changed the title Cast to string Incorrect __toString behavior in exception Oct 28, 2014
Mihailoff added a commit to Mihailoff/shellwrap that referenced this issue Oct 28, 2014
@IGitSylvia
Copy link

Hey MrRio, I have the same issues as Mihailoff on my (windows apache mod_php 5.4) dev machine. On any script (my own and your examples) I try your library I get the following:

Warning: MrRio\ShellWrapException::__toString() must return a string in Unknown on line 0

Fatal error: Uncaught thrown in C:\www\building-blocks\cmd\shellwrap-master\shellwrap-master\src\MrRio\ShellWrap.php on line 180

Both both the browser and cli. What do you think?

@MrRio
Copy link
Owner

MrRio commented Nov 11, 2014

Can you try again with the latest version?

@IGitSylvia
Copy link

Ok, I will.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants