From 62ddc13d822e9814b8a52f64f38e63123c87700f Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 3 Dec 2008 19:56:05 +0000 Subject: [PATCH] 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 --- wp-includes/http.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wp-includes/http.php b/wp-includes/http.php index 5d0523e9e3..eb61cc9c8c 100644 --- a/wp-includes/http.php +++ b/wp-includes/http.php @@ -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);