X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FHttpClient.php;h=3a34e18970c665a5c3b3e68a6871ec71863c27f0;hb=1d315b34a5061bd49fd96a4398f953c6da5344b6;hp=c7989ec626842d935c381ed23a99e1107a0fee46;hpb=d2dfeda154f5861cb04c8fc08e1a350a521c11ff;p=civicrm-core.git diff --git a/CRM/Utils/HttpClient.php b/CRM/Utils/HttpClient.php index c7989ec626..3a34e18970 100644 --- a/CRM/Utils/HttpClient.php +++ b/CRM/Utils/HttpClient.php @@ -48,7 +48,8 @@ class CRM_Utils_HttpClient { } /** - * @param null $connectionTimeout + * @param int|null $connectionTimeout + * seconds; or NULL to use system default */ public function __construct($connectionTimeout = NULL) { $this->connectionTimeout = $connectionTimeout; @@ -117,7 +118,6 @@ class CRM_Utils_HttpClient { list($ch, $caConfig) = $this->createCurl($remoteFile); if (preg_match('/^https:/', $remoteFile) && !$caConfig->isEnableSSL()) { - // CRM_Core_Error::fatal('Cannot install this extension - does not support SSL'); return [self::STATUS_DL_ERROR, NULL]; } @@ -146,14 +146,12 @@ class CRM_Utils_HttpClient { public function post($remoteFile, $params) { // Download extension zip file ... if (!function_exists('curl_init')) { - //CRM_Core_Error::fatal('Cannot install this extension - curl is not installed!'); return [self::STATUS_DL_ERROR, NULL]; } list($ch, $caConfig) = $this->createCurl($remoteFile); if (preg_match('/^https:/', $remoteFile) && !$caConfig->isEnableSSL()) { - // CRM_Core_Error::fatal('Cannot install this extension - does not support SSL'); return [self::STATUS_DL_ERROR, NULL]; } @@ -204,7 +202,7 @@ class CRM_Utils_HttpClient { * @return bool */ public function isRedirectSupported() { - return (ini_get('open_basedir') == '') && (ini_get('safe_mode') == 'Off' || ini_get('safe_mode') == '' || ini_get('safe_mode') === FALSE); + return (ini_get('open_basedir') == ''); } }