NoHttpResponseException needed instead of HTTP_Request2_Exception

HTTP_Request2_Exception assumed an HTTP response status code/line
This commit is contained in:
Mikael Nordfeldth
2016-01-13 14:08:48 +01:00
parent e75472f460
commit 3ed632decf
5 changed files with 48 additions and 5 deletions

View File

@@ -290,7 +290,7 @@ class HTTPClient extends HTTP_Request2
$response = $this->send();
if (is_null($response)) {
// TRANS: Failed to retrieve a remote web resource, %s is the target URL.
throw new HTTP_Request2_Exception(sprintf(_m('HTTP request failed without response to URL: %s'), var_export($target, true)));
throw new NoHttpResponseException($url);
}
return $response;
}