X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Fnetwork.php;h=f9d35c52c34557d387f09eb490b23aa3358119b2;hb=f94a10bf00de699a5f3d22ea74665053a5661175;hp=984ee8733761149df67de5c9bff06cd9af84f101;hpb=f9f27c2f5f3ba0fdbe59ac4a4da7570bbe34224e;p=friendica.git diff --git a/include/network.php b/include/network.php index 984ee87337..f9d35c52c3 100644 --- a/include/network.php +++ b/include/network.php @@ -72,8 +72,9 @@ function z_fetch_url($url,$binary = false, &$redirects = 0, $opts=array()) { $a = get_app(); $ch = @curl_init($url); - if(($redirects > 8) || (! $ch)) - return false; + if(($redirects > 8) || (! $ch)) { + return $ret; + } @curl_setopt($ch, CURLOPT_HEADER, true); @@ -118,7 +119,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)) { @@ -267,7 +270,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);