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:
ryan 2008-12-03 19:56:05 +00:00
parent 5517f4208d
commit b5f623a9ea
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);