summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Gass2024-05-21 10:25:42 +0200
committerNathan Gass2024-05-21 10:27:04 +0200
commit8c86436125d34e1dc322c475f7d460cad682cdd7 (patch)
tree929e447a132e9073a17dfcd286b1dce672ef256c
parent51de527d677b9e507941d3d268e7b5d911e89e4d (diff)
downloaditools-8c86436125d34e1dc322c475f7d460cad682cdd7.tar.gz
itools-8c86436125d34e1dc322c475f7d460cad682cdd7.tar.bz2
itools-8c86436125d34e1dc322c475f7d460cad682cdd7.zip
more meaningful error message in title than 0 No Error
-rw-r--r--it_url.class4
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;