Skip to content

Commit 5748975

Browse files
javiereguiluznicolas-grekas
authored andcommitted
Code updates
1 parent 3e9c9c4 commit 5748975

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CurlHttpClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function request(string $method, string $url, array $options = []): Respo
106106
\CURLOPT_PROTOCOLS => \CURLPROTO_HTTP | \CURLPROTO_HTTPS,
107107
\CURLOPT_REDIR_PROTOCOLS => \CURLPROTO_HTTP | \CURLPROTO_HTTPS,
108108
\CURLOPT_FOLLOWLOCATION => true,
109-
\CURLOPT_MAXREDIRS => 0 < $options['max_redirects'] ? $options['max_redirects'] : 0,
109+
\CURLOPT_MAXREDIRS => max(0, $options['max_redirects']),
110110
\CURLOPT_COOKIEFILE => '', // Keep track of cookies during redirects
111111
\CURLOPT_TIMEOUT => 0,
112112
\CURLOPT_PROXY => $proxy,

0 commit comments

Comments
 (0)