Skip to content

Commit 68a3501

Browse files
committed
Merge branch '6.4' into 7.1
* 6.4: (29 commits) Fix #53778 [PropertyInfo] Add missing test fix tests [Security][Validators] Review translations. [validator] Updated Dutch translation [FrameworkBundle] Fix wiring ConsoleProfilerListener [HttpKernel] Fix link to php doc [Validator] Update sr_Cyrl 120:This value is not a valid slug. [Validator] Update sr_Latn 120:This value is not a valid slug. 6.4 Missing translations for Italian (it) #59419 tests(notifier): avoid failing SNS test with local AWS configuration [Validator] Missing translations for Brazilian Portuguese (pt_BR) [Translation][Validator] Review Russian translation (114 - 120) Review validator-related persian translation with id 120 [Scheduler] Clarify description of exclusion time [HttpFoundation][FrameworkBundle] Reset Request's formats using the service resetter [Mailer] Fix SMTP stream EOF handling on Windows by using feof() [Translations] Make sure PL translations validators.pl.xlf follow the same style [Validator] Checked Turkish validators translations and confirmed [VarDumper] Fix blank strings display ...
2 parents e221bfd + 05f4f87 commit 68a3501

File tree

4 files changed

+30
-5
lines changed

4 files changed

+30
-5
lines changed

HttplugClient.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,11 @@ private function sendPsr7Request(RequestInterface $request, ?bool $buffer = null
226226
$body = $request->getBody();
227227

228228
if ($body->isSeekable()) {
229-
$body->seek(0);
229+
try {
230+
$body->seek(0);
231+
} catch (\RuntimeException) {
232+
// ignore
233+
}
230234
}
231235

232236
$options = [

Internal/HttplugWaitLoop.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,11 @@ public static function createPsr7Response(ResponseFactoryInterface $responseFact
140140
}
141141

142142
if ($body->isSeekable()) {
143-
$body->seek(0);
143+
try {
144+
$body->seek(0);
145+
} catch (\RuntimeException) {
146+
// ignore
147+
}
144148
}
145149

146150
return $psrResponse->withBody($body);

Psr18Client.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ public function sendRequest(RequestInterface $request): ResponseInterface
9090
$body = $request->getBody();
9191

9292
if ($body->isSeekable()) {
93-
$body->seek(0);
93+
try {
94+
$body->seek(0);
95+
} catch (\RuntimeException) {
96+
// ignore
97+
}
9498
}
9599

96100
$options = [
@@ -136,7 +140,11 @@ public function createStream(string $content = ''): StreamInterface
136140
$stream = $this->streamFactory->createStream($content);
137141

138142
if ($stream->isSeekable()) {
139-
$stream->seek(0);
143+
try {
144+
$stream->seek(0);
145+
} catch (\RuntimeException) {
146+
// ignore
147+
}
140148
}
141149

142150
return $stream;

Response/CurlResponse.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,16 @@ private static function perform(ClientState $multi, ?array &$responses = null):
316316
}
317317

318318
$multi->handlesActivity[$id][] = null;
319-
$multi->handlesActivity[$id][] = \in_array($result, [\CURLE_OK, \CURLE_TOO_MANY_REDIRECTS], true) || '_0' === $waitFor || curl_getinfo($ch, \CURLINFO_SIZE_DOWNLOAD) === curl_getinfo($ch, \CURLINFO_CONTENT_LENGTH_DOWNLOAD) || (curl_error($ch) === 'OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 0' && -1.0 === curl_getinfo($ch, \CURLINFO_CONTENT_LENGTH_DOWNLOAD) && \in_array('close', array_map('strtolower', $responses[$id]->headers['connection']), true)) ? null : new TransportException(ucfirst(curl_error($ch) ?: curl_strerror($result)).sprintf(' for "%s".', curl_getinfo($ch, \CURLINFO_EFFECTIVE_URL)));
319+
$multi->handlesActivity[$id][] = \in_array($result, [\CURLE_OK, \CURLE_TOO_MANY_REDIRECTS], true)
320+
|| '_0' === $waitFor
321+
|| curl_getinfo($ch, \CURLINFO_SIZE_DOWNLOAD) === curl_getinfo($ch, \CURLINFO_CONTENT_LENGTH_DOWNLOAD)
322+
|| ('C' === $waitFor[0]
323+
&& 'OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 0' === curl_error($ch)
324+
&& -1.0 === curl_getinfo($ch, \CURLINFO_CONTENT_LENGTH_DOWNLOAD)
325+
&& \in_array('close', array_map('strtolower', $responses[$id]->headers['connection'] ?? []), true)
326+
)
327+
? null
328+
: new TransportException(ucfirst(curl_error($ch) ?: curl_strerror($result)).\sprintf(' for "%s".', curl_getinfo($ch, \CURLINFO_EFFECTIVE_URL)));
320329
}
321330
} finally {
322331
$multi->performing = false;

0 commit comments

Comments
 (0)