From: Max Semenik Date: Tue, 8 Jan 2019 02:25:59 +0000 (-0800) Subject: Remove a CURLOPT_CONNECTTIMEOUT_MS check X-Git-Tag: 1.34.0-rc.0~3111^2 X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_user_edit%27%2C%20iduser=user.userid%29%20%7D%7D?a=commitdiff_plain;h=731ebeea38bfdc282ef7d562d61bcd7d23c5099d;p=lhc%2Fweb%2Fwiklou.git Remove a CURLOPT_CONNECTTIMEOUT_MS check It was introduced in PHP 5.2.3. Change-Id: I0c7e1684038c98677ceefbcfbb78641e90713002 --- diff --git a/includes/http/CurlHttpRequest.php b/includes/http/CurlHttpRequest.php index bab85216c0..8ef9cc226b 100644 --- a/includes/http/CurlHttpRequest.php +++ b/includes/http/CurlHttpRequest.php @@ -52,12 +52,7 @@ class CurlHttpRequest extends MWHttpRequest { $this->curlOptions[CURLOPT_PROXY] = $this->proxy; $this->curlOptions[CURLOPT_TIMEOUT] = $this->timeout; - - // Only supported in curl >= 7.16.2 - if ( defined( 'CURLOPT_CONNECTTIMEOUT_MS' ) ) { - $this->curlOptions[CURLOPT_CONNECTTIMEOUT_MS] = $this->connectTimeout * 1000; - } - + $this->curlOptions[CURLOPT_CONNECTTIMEOUT_MS] = $this->connectTimeout * 1000; $this->curlOptions[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_0; $this->curlOptions[CURLOPT_WRITEFUNCTION] = $this->callback; $this->curlOptions[CURLOPT_HEADERFUNCTION] = [ $this, "readHeader" ];