Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-20235 - Suppress annoying extension download error messages #9954

Merged
merged 1 commit into from
Mar 9, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions CRM/Utils/HttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,12 @@ public function fetch($remoteFile, $localFile) {

$fp = @fopen($localFile, "w");
if (!$fp) {
// Fixme: throw error instead of setting message
CRM_Core_Session::setStatus(ts('Unable to write to %1.<br />Is the location writable?', array(1 => $localFile)), ts('Write Error'), 'error');
return self::STATUS_WRITE_ERROR;
}
curl_setopt($ch, CURLOPT_FILE, $fp);

curl_exec($ch);
if (curl_errno($ch)) {
// Fixme: throw error instead of setting message
CRM_Core_Session::setStatus(ts('Unable to download extension from %1. Error Message: %2',
array(1 => $remoteFile, 2 => curl_error($ch))), ts('Extension download error'), 'error');
return self::STATUS_DL_ERROR;
}
else {
Expand Down