File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed
Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -68,15 +68,15 @@ public function getOutput()
6868 if (! $ this ->output ) {
6969 $ processOutput = $ this ->process ->getOutput ();
7070
71- $ childResult = @unserialize (base64_decode ($ processOutput ));
71+ $ childResult = @unserialize (base64_decode ($ processOutput ));
7272
7373 if ($ childResult === false || ! array_key_exists ('output ' , $ childResult )) {
7474 $ this ->errorOutput = $ processOutput ;
7575
76- return null ;
76+ return null ;
7777 }
7878
79- $ this ->output = $ childResult ['output ' ];
79+ $ this ->output = $ childResult ['output ' ];
8080 }
8181
8282 return $ this ->output ;
@@ -87,13 +87,13 @@ public function getErrorOutput()
8787 if (! $ this ->errorOutput ) {
8888 $ processOutput = $ this ->process ->getErrorOutput ();
8989
90- $ childResult = @unserialize (base64_decode ($ processOutput ));
90+ $ childResult = @unserialize (base64_decode ($ processOutput ));
9191
9292 if ($ childResult === false || ! array_key_exists ('output ' , $ childResult )) {
9393 $ this ->errorOutput = $ processOutput ;
94- } else {
95- $ this ->errorOutput = $ childResult ['output ' ];
96- }
94+ } else {
95+ $ this ->errorOutput = $ childResult ['output ' ];
96+ }
9797 }
9898
9999 return $ this ->errorOutput ;
Original file line number Diff line number Diff line change 44
55// php://stdout does not obey output buffering. Any output would break
66// unserialization of child process results in the parent process.
7- if (!defined ('STDOUT ' )) {
7+ if (! defined ('STDOUT ' )) {
88 define ('STDOUT ' , fopen ('php://temp ' , 'w+b ' ));
99 define ('STDERR ' , fopen ('php://stderr ' , 'wb ' ));
1010}
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ public function it_can_run()
1616
1717 $ serializedClosure = base64_encode (serialize (new SerializableClosure (function () {
1818 echo 'interfere with output ' ;
19+
1920 return 'child ' ;
2021 })));
2122
You can’t perform that action at this time.
0 commit comments