]> git.mxchange.org Git - friendica.git/blobdiff - include/network.php
Resubmit all profiles on directory change
[friendica.git] / include / network.php
index 749f996f8c1a50605b3a03750c71461d315db7c0..f9d35c52c34557d387f09eb490b23aa3358119b2 100644 (file)
@@ -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);
 
@@ -143,6 +144,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);