]> git.mxchange.org Git - friendica.git/commitdiff
Report errors during cURL fetch
authorMatthew Exon <github.mexon@spamgourmet.com>
Sun, 3 Jan 2016 05:59:54 +0000 (06:59 +0100)
committerMatthew Exon <github.mexon@spamgourmet.com>
Mon, 25 Jan 2016 01:56:47 +0000 (02:56 +0100)
include/network.php

index 611f00632f4a5d507008b7d9308fa33704f77206..cc267966e8fd7d562cf4be36df54cb996f3f9d7c 100644 (file)
@@ -116,6 +116,9 @@ function z_fetch_url($url,$binary = false, &$redirects = 0, $opts=array()) {
        // if it throws any errors.
 
        $s = @curl_exec($ch);
+       if (curl_errno($ch) !== CURLE_OK) {
+               logger('fetch_url error fetching '.$url.': '.curl_error($ch), LOGGER_NORMAL);
+       }
 
        $base = $s;
        $curl_info = @curl_getinfo($ch);