X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FHttpClient.php;h=c7989ec626842d935c381ed23a99e1107a0fee46;hb=c77f9b14576dbe8314a82b2e4f19a170d3cc1695;hp=4bab3001ea565638be82887c02c136c0a83d97ab;hpb=8de7047a8762a15823f6bd10b94447d3d83937e2;p=civicrm-core.git diff --git a/CRM/Utils/HttpClient.php b/CRM/Utils/HttpClient.php index 4bab3001ea..c7989ec626 100644 --- a/CRM/Utils/HttpClient.php +++ b/CRM/Utils/HttpClient.php @@ -62,16 +62,18 @@ class CRM_Utils_HttpClient { * @param string $localFile * Path at which to store the .zip file. * @return STATUS_OK|STATUS_WRITE_ERROR|STATUS_DL_ERROR + * + * @throws CRM_Core_Exception */ public function fetch($remoteFile, $localFile) { // Download extension zip file ... if (!function_exists('curl_init')) { - CRM_Core_Error::fatal('Cannot install this extension - curl is not installed!'); + throw new CRM_Core_Exception('Cannot install this extension - curl is not installed!'); } 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'); + throw new CRM_Core_Exception('Cannot install this extension - does not support SSL'); } $fp = @fopen($localFile, "w");