diff options
-rw-r--r-- | it_url.class | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/it_url.class b/it_url.class index fac7e0c..953562d 100644 --- a/it_url.class +++ b/it_url.class @@ -369,7 +369,7 @@ function request($p=array()) else { $result = $this->result = false; - $this->errstr = trim("(" . curl_errno($curl) . ") " . curl_error($curl)); + $this->errstr = trim(curl_strerror(curl_errno($curl)) . "(" . curl_errno($curl) . ") " . curl_error($curl)); } if ($p['verbose']) @@ -381,7 +381,7 @@ function request($p=array()) if ($got === false && $p['retries'] <= 0) { - it::error((array)$p['it_error'] + ['title' => "problem " . ($p['method'] ?: "gett") . "ing $url->url with curl: " . curl_strerror(curl_errno($curl)) . " (" . curl_errno($curl) . ") " . curl_error($curl), 'body' => ['Error description' => $this->errstr] + curl_getinfo($curl) + ($p['verbose'] ? ['verbose' => $this->verbose] : [])]); + it::error((array)$p['it_error'] + ['title' => "problem " . ($p['method'] ?: "gett") . "ing $url->url: " . $this->errstr, 'body' => curl_getinfo($curl) + ($p['verbose'] ? ['verbose' => $this->verbose] : [])]); } return $result; |