File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -453,10 +453,7 @@ public function start(array $mode = DescriptorSpec::BASIC): Promise
453453 foreach ($ read as $ stream ) {
454454 if (!feof ($ stream )) {
455455 $ data = stream_get_contents ($ stream , 1024 );
456- if ($ data === false || $ data === '' ) {
457- if (feof ($ stream )) continue 2 ;
458- break ;
459- }
456+ if ($ data === false || $ data === '' ) continue ;
460457 $ stream === $ pipes [1 ] ? $ output .= $ data : $ error .= $ data ;
461458 }
462459 FiberManager::wait ();
@@ -474,8 +471,8 @@ public function start(array $mode = DescriptorSpec::BASIC): Promise
474471
475472 $ outputStream = stream_get_contents ($ pipes [1 ]);
476473 $ errorStream = stream_get_contents ($ pipes [2 ]);
477- $ output .= str_contains ($ output , $ outputStream ) ? '' : $ outputStream ;
478- $ error .= str_contains ($ error , $ errorStream ) ? '' : $ errorStream ;
474+ if (! is_bool ( $ outputStream )) $ output .= str_contains ($ output , $ outputStream ) ? '' : $ outputStream ;
475+ if (! is_bool ( $ errorStream )) $ error .= str_contains ($ error , $ errorStream ) ? '' : $ errorStream ;
479476
480477 fclose ($ pipes [1 ]);
481478 fclose ($ pipes [2 ]);
You can’t perform that action at this time.
0 commit comments