Skip to content

Commit

Permalink
Merge branch '5.4' into 6.3
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
nicolas-grekas committed Jan 29, 2024
2 parents 1854d8a + 664724b commit 3cbb745
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Transport/Smtp/Stream/AbstractStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function readLine(): string
return '';
}

$line = fgets($this->out);
$line = @fgets($this->out);
if ('' === $line || false === $line) {
$metas = stream_get_meta_data($this->out);
if ($metas['timed_out']) {
Expand All @@ -83,6 +83,9 @@ public function readLine(): string
if ($metas['eof']) {
throw new TransportException(sprintf('Connection to "%s" has been closed unexpectedly.', $this->getReadConnectionDescription()));
}
if (false === $line) {
throw new TransportException(sprintf('Unable to read from connection to "%s": ', $this->getReadConnectionDescription()).error_get_last()['message']);
}
}

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

0 comments on commit 3cbb745

Please sign in to comment.