mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-30 20:20:53 +00:00
Set error message from curl error or http error when applicable
This commit is contained in:
@@ -90,6 +90,7 @@ class Curl {
|
||||
$this->http_error = in_array(floor($this->http_error_code / 100), array(4, 5));
|
||||
$this->error = $this->curl_error || $this->http_error;
|
||||
$this->error_code = $this->curl_error ? $this->curl_error_code : $this->http_error_code;
|
||||
$this->error_message = $this->curl_error ? $this->curl_error_message : $this->http_error_message;
|
||||
|
||||
$this->request_headers = preg_split('/\r\n/', curl_getinfo($this->curl, CURLINFO_HEADER_OUT), NULL, PREG_SPLIT_NO_EMPTY);
|
||||
$this->response_headers = '';
|
||||
|
||||
Reference in New Issue
Block a user