Merge pull request #2292 from mexon/mat/pullrequest2
Report errors during cURL fetch
This commit is contained in:
commit
27fe3e7160
1 changed files with 3 additions and 0 deletions
|
@ -116,6 +116,9 @@ function z_fetch_url($url,$binary = false, &$redirects = 0, $opts=array()) {
|
||||||
// if it throws any errors.
|
// if it throws any errors.
|
||||||
|
|
||||||
$s = @curl_exec($ch);
|
$s = @curl_exec($ch);
|
||||||
|
if (curl_errno($ch) !== CURLE_OK) {
|
||||||
|
logger('fetch_url error fetching '.$url.': '.curl_error($ch), LOGGER_NORMAL);
|
||||||
|
}
|
||||||
|
|
||||||
$base = $s;
|
$base = $s;
|
||||||
$curl_info = @curl_getinfo($ch);
|
$curl_info = @curl_getinfo($ch);
|
||||||
|
|
Loading…
Reference in a new issue