shellwrap icon indicating copy to clipboard operation
shellwrap copied to clipboard

Incorrect __toString behavior in exception

Open Mihailoff opened this issue 10 years ago • 5 comments

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

Mihailoff avatar Oct 25 '14 01:10 Mihailoff

Do you have some example code that produces this error?

MrRio avatar Oct 25 '14 14:10 MrRio

$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 avatar Oct 27 '14 20:10 Mihailoff

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?

IGitSylvia avatar Nov 11 '14 02:11 IGitSylvia

Can you try again with the latest version?

MrRio avatar Nov 11 '14 19:11 MrRio

Ok, I will.

IGitSylvia avatar Nov 12 '14 00:11 IGitSylvia