Remove a CURLOPT_CONNECTTIMEOUT_MS check
authorMax Semenik <maxsem.wiki@gmail.com>
Tue, 8 Jan 2019 02:25:59 +0000 (18:25 -0800)
committerMax Semenik <maxsem.wiki@gmail.com>
Tue, 8 Jan 2019 02:25:59 +0000 (18:25 -0800)
It was introduced in PHP 5.2.3.

Change-Id: I0c7e1684038c98677ceefbcfbb78641e90713002

includes/http/CurlHttpRequest.php

index bab8521..8ef9cc2 100644 (file)
@@ -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" ];