|
26 | 26 | 'CURLE_SSL_CACERT' => 60,
|
27 | 27 | 'CURLE_SSL_CACERT_BADFILE' => 77,
|
28 | 28 | 'CURLE_SSL_CRL_BADFILE' => 82,
|
29 |
| - 'CURLE_SSL_ISSUER_ERROR' => 83 |
| 29 | + 'CURLE_SSL_ISSUER_ERROR' => 83, |
| 30 | + // workaround for http://php.net/manual/en/function.curl-setopt.php#107314 |
| 31 | + '_CURLOPT_TIMEOUT_MS' => 155, |
| 32 | + '_CURLOPT_CONNECTTIMEOUT_MS' => 156 |
30 | 33 | );
|
31 | 34 | foreach ($constants as $id => $i) {
|
32 | 35 | defined($id) or define($id, $i);
|
@@ -1165,8 +1168,8 @@ protected function _buildMultipart($method, $params)
|
1165 | 1168 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
|
1166 | 1169 | curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
|
1167 | 1170 | // use hardcoded download timeouts for now
|
1168 |
| - curl_setopt($ch, CURLOPT_TIMEOUT_MS, 5000); |
1169 |
| - curl_setopt($ch, CURLOPT_CONNECTTIMEOUT_MS, 2000); |
| 1171 | + curl_setopt($ch, _CURLOPT_TIMEOUT_MS, 5000); |
| 1172 | + curl_setopt($ch, _CURLOPT_CONNECTTIMEOUT_MS, 2000); |
1170 | 1173 | $result = curl_exec($ch);
|
1171 | 1174 | if ($result !== false) {
|
1172 | 1175 | $value = $result;
|
@@ -1329,11 +1332,11 @@ protected function _callApiCurl(
|
1329 | 1332 | curl_setopt($ch, CURLOPT_CAINFO, __DIR__ . '/cacert.pem');
|
1330 | 1333 |
|
1331 | 1334 | if (isset($this->_timeout)) {
|
1332 |
| - curl_setopt($ch, CURLOPT_TIMEOUT_MS, $this->_timeout); |
| 1335 | + curl_setopt($ch, _CURLOPT_TIMEOUT_MS, $this->_timeout); |
1333 | 1336 | }
|
1334 | 1337 |
|
1335 | 1338 | if (isset($this->_connectionTimeout)) {
|
1336 |
| - curl_setopt($ch, CURLOPT_CONNECTTIMEOUT_MS, $this->_connectionTimeout); |
| 1339 | + curl_setopt($ch, _CURLOPT_CONNECTTIMEOUT_MS, $this->_connectionTimeout); |
1337 | 1340 | }
|
1338 | 1341 |
|
1339 | 1342 | $result = curl_exec($ch);
|
|
0 commit comments