Skip to content

Commit 3cbb745

Browse files
Merge branch '5.4' into 6.3
* 5.4: [HttpClient] Fix pausing responses before they start when using curl separate child and parent context in NotificationEmail on writes 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
2 parents 1854d8a + 664724b commit 3cbb745

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
@@ -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);

0 commit comments

Comments
 (0)