From d8c3f04ddaca03339f2258665aceb044ac7320e2 Mon Sep 17 00:00:00 2001 From: Miguel Santos Date: Mon, 11 Oct 2021 22:24:53 +0000 Subject: [PATCH] fix: RetryableHttpClient yielding null --- src/Symfony/Component/HttpClient/RetryableHttpClient.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpClient/RetryableHttpClient.php b/src/Symfony/Component/HttpClient/RetryableHttpClient.php index afab2f8d0388b..a0c099a9adddf 100644 --- a/src/Symfony/Component/HttpClient/RetryableHttpClient.php +++ b/src/Symfony/Component/HttpClient/RetryableHttpClient.php @@ -117,7 +117,9 @@ public function request(string $method, string $url, array $options = []): Respo if (false === $shouldRetry) { $context->passthru(); - yield $firstChunk; + if (null !== $firstChunk) { + yield $firstChunk; + } yield $context->createChunk($content); $content = '';