Skip to content

Commit ba1b4a9

Browse files
committed
Merge branch '7.2' into 7.3
* 7.2: skip transient test on GitHub Actions skip transient test on GitHub Actions pass CURLOPT_INFILESIZE_LARGE only when supported
2 parents 4f9b313 + bffd80d commit ba1b4a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CurlHttpClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,8 @@ public function request(string $method, string $url, array $options = []): Respo
322322
}
323323

324324
foreach ($curlopts as $opt => $value) {
325-
if (\CURLOPT_INFILESIZE === $opt && $value >= 1 << 31) {
326-
$opt = 115; // 115 === CURLOPT_INFILESIZE_LARGE, but it's not defined in PHP
325+
if (\PHP_INT_SIZE === 8 && \defined('CURLOPT_INFILESIZE_LARGE') && \CURLOPT_INFILESIZE === $opt && $value >= 1 << 31) {
326+
$opt = \CURLOPT_INFILESIZE_LARGE;
327327
}
328328
if (null !== $value && !curl_setopt($ch, $opt, $value) && \CURLOPT_CERTINFO !== $opt && (!\defined('CURLOPT_HEADEROPT') || \CURLOPT_HEADEROPT !== $opt)) {
329329
$constantName = $this->findConstantName($opt);

0 commit comments

Comments
 (0)