Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/Http.php')
-rw-r--r--core/Http.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/Http.php b/core/Http.php
index 3643fc8553..25d6d59566 100644
--- a/core/Http.php
+++ b/core/Http.php
@@ -47,7 +47,7 @@ class Http
protected static function isCurlEnabled()
{
- return function_exists('curl_init');
+ return function_exists('curl_init') && function_exists('curl_exec');
}
/**
@@ -99,7 +99,7 @@ class Http
*
* @param string $method
* @param string $aUrl
- * @param int $timeout
+ * @param int $timeout in seconds
* @param string $userAgent
* @param string $destinationPath
* @param resource $file
@@ -444,6 +444,7 @@ class Http
// only get header info if not saving directly to file
CURLOPT_HEADER => is_resource($file) ? false : true,
CURLOPT_CONNECTTIMEOUT => $timeout,
+ CURLOPT_TIMEOUT => $timeout,
);
// Case core:archive command is triggering archiving on https:// and the certificate is not valid
if ($acceptInvalidSslCertificate) {