File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/Symfony/Component/Mailer/Transport/Smtp/Stream 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
7474 return '' ;
7575 }
7676
77- $ line = fgets ($ this ->out );
77+ $ line = @ fgets ($ this ->out );
7878 if ('' === $ line || false === $ line ) {
7979 $ metas = stream_get_meta_data ($ this ->out );
8080 if ($ metas ['timed_out ' ]) {
@@ -83,6 +83,9 @@ public function readLine(): string
8383 if ($ metas ['eof ' ]) {
8484 throw new TransportException (sprintf ('Connection to "%s" has been closed unexpectedly. ' , $ this ->getReadConnectionDescription ()));
8585 }
86+ if (false === $ line ) {
87+ throw new TransportException (sprintf ('Unable to read from connection to "%s": ' , $ this ->getReadConnectionDescription ()).error_get_last ()['message ' ]);
88+ }
8689 }
8790
8891 $ this ->debug .= sprintf ('< %s ' , $ line );
You can’t perform that action at this time.
0 commit comments