Round timeouts less then 1 but greater than 0 to 1 for curl transport. see #8086

git-svn-id: https://develop.svn.wordpress.org/trunk@10025 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-12-03 19:56:05 +00:00
parent 0d75a8896b
commit 62ddc13d82
1 changed files with 4 additions and 0 deletions

View File

@ -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);