Skip to content

Commit 74412c6

Browse files
Merge branch '6.3' into 6.4
* 6.3: Add missing return type [HttpClient] Fix pausing responses before they start when using curl separate child and parent context in NotificationEmail on writes [Mailer] [Mailgun] Fix sender header encoding do not overwrite the cache key when it is false [Mailer] Throw TransportException when unable to read from socket [Serializer] Rewrite `AbstractObjectNormalizer::createChildContext()` to use the provided `cache_key` from original context when creating child contexts [HttpClient] Fix error chunk creation in passthru Adjusting and removing the 'review' attribute from the pt_br translation XML. [Serializer] Take unnamed variadic parameters into account when denormalizing Fix context data and display extra data
2 parents 23a9bc9 + 3cbb745 commit 74412c6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Transport/Smtp/Stream/AbstractStream.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function readLine(): string
7777
return '';
7878
}
7979

80-
$line = fgets($this->out);
80+
$line = @fgets($this->out);
8181
if ('' === $line || false === $line) {
8282
$metas = stream_get_meta_data($this->out);
8383
if ($metas['timed_out']) {
@@ -86,6 +86,9 @@ public function readLine(): string
8686
if ($metas['eof']) {
8787
throw new TransportException(sprintf('Connection to "%s" has been closed unexpectedly.', $this->getReadConnectionDescription()));
8888
}
89+
if (false === $line) {
90+
throw new TransportException(sprintf('Unable to read from connection to "%s": ', $this->getReadConnectionDescription()).error_get_last()['message']);
91+
}
8992
}
9093

9194
$this->debug .= sprintf('< %s', $line);

0 commit comments

Comments
 (0)