mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Round timeouts less then 1 but greater than 0 to 1 for curl transport. see #8086
git-svn-id: http://svn.automattic.com/wordpress/trunk@10025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5517f4208d
commit
b5f623a9ea
@ -973,6 +973,10 @@ class WP_Http_Curl {
|
||||
unset($r['headers']['user-agent']);
|
||||
}
|
||||
|
||||
// If timeout is a float less than 1, round it up to 1.
|
||||
if ( $r['timeout'] > 0 && $r['timeout'] < 1 )
|
||||
$r['timeout'] = 1;
|
||||
|
||||
$handle = curl_init();
|
||||
curl_setopt( $handle, CURLOPT_URL, $url);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user