aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/network.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/network.php b/include/network.php
index 27f912508..7fc3d835e 100644
--- a/include/network.php
+++ b/include/network.php
@@ -115,8 +115,9 @@ function z_fetch_url($url, $binary = false, $redirects = 0, $opts = array()) {
$ret['return_code'] = $rc;
$ret['success'] = (($rc >= 200 && $rc <= 299) ? true : false);
if(! $ret['success']) {
+ $ret['error'] = curl_error($ch);
$ret['debug'] = $curl_info;
- logger('z_fetch_url: error:' . curl_error($ch), LOGGER_DEBUG);
+ logger('z_fetch_url: error:' . $ret['error'], LOGGER_DEBUG);
logger('z_fetch_url: debug:' . print_r($curl_info,true), LOGGER_DATA);
}
$ret['body'] = substr($s,strlen($header));
@@ -218,8 +219,9 @@ function z_post_url($url,$params, $redirects = 0, $opts = array()) {
$ret['return_code'] = $rc;
$ret['success'] = (($rc >= 200 && $rc <= 299) ? true : false);
if(! $ret['success']) {
+ $ret['error'] = curl_error($ch);
$ret['debug'] = $curl_info;
- logger('z_post_url: error:' . curl_error($ch), LOGGER_DEBUG);
+ logger('z_post_url: error:' . $ret['error'], LOGGER_DEBUG);
logger('z_post_url: debug:' . print_r($curl_info,true), LOGGER_DATA);
}