X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Fnetwork.php;h=b0e71fab7f8b93ecbc520c9af4e14e05c713992d;hb=98945eb6fa4e9d9becbeebf41648ead49e32d4da;hp=03f65a5190a08182d11939f30b0eb031ab955a94;hpb=30b4da37fcb4f6bb9beee89b6688b46f7949016e;p=friendica.git diff --git a/include/network.php b/include/network.php index 03f65a5190..b0e71fab7f 100644 --- a/include/network.php +++ b/include/network.php @@ -118,7 +118,9 @@ function z_fetch_url($url,$binary = false, &$redirects = 0, $opts=array()) { $check_cert = get_config('system','verifyssl'); @curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, (($check_cert) ? true : false)); - @curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, (($check_cert) ? 2 : false)); + if ($check_cert) { + @curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); + } $prx = get_config('system','proxy'); if(strlen($prx)) { @@ -141,6 +143,8 @@ function z_fetch_url($url,$binary = false, &$redirects = 0, $opts=array()) { logger('fetch_url error fetching '.$url.': '.curl_error($ch), LOGGER_NORMAL); } + $ret['errno'] = curl_errno($ch); + $base = $s; $curl_info = @curl_getinfo($ch); @@ -265,7 +269,9 @@ function post_url($url,$params, $headers = null, &$redirects = 0, $timeout = 0) $check_cert = get_config('system','verifyssl'); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, (($check_cert) ? true : false)); - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, (($check_cert) ? 2 : false)); + if ($check_cert) { + @curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); + } $prx = get_config('system','proxy'); if(strlen($prx)) { curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);