1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-07-17 15:01:19 +02:00

Add cUrl error message and code to the debugMessage (#711)

This commit is contained in:
hunhejj
2018-06-10 22:08:45 +02:00
committed by LogMANOriginal
parent 064ba456e8
commit d92da8f0f7

View File

@@ -22,10 +22,12 @@ function getContents($url, $header = array(), $opts = array()){
}
$content = curl_exec($ch);
$curlError = curl_error($ch);
$curlErrno = curl_errno($ch);
curl_close($ch);
if($content === false)
debugMessage('Cant\'t download ' . $url);
debugMessage('Cant\'t download ' . $url . ' cUrl error: ' . $curlError . ' (' . $curlErrno . ')');
return $content;
}