File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ public function readLine(): string
74
74
return '' ;
75
75
}
76
76
77
- $ line = fgets ($ this ->out );
77
+ $ line = @ fgets ($ this ->out );
78
78
if ('' === $ line || false === $ line ) {
79
79
$ metas = stream_get_meta_data ($ this ->out );
80
80
if ($ metas ['timed_out ' ]) {
@@ -83,6 +83,9 @@ public function readLine(): string
83
83
if ($ metas ['eof ' ]) {
84
84
throw new TransportException (sprintf ('Connection to "%s" has been closed unexpectedly. ' , $ this ->getReadConnectionDescription ()));
85
85
}
86
+ if (false === $ line ) {
87
+ throw new TransportException (sprintf ('Unable to read from connection to "%s": ' , $ this ->getReadConnectionDescription ()).error_get_last ()['message ' ]);
88
+ }
86
89
}
87
90
88
91
$ this ->debug .= sprintf ('< %s ' , $ line );
You can’t perform that action at this time.
0 commit comments