diff --git a/classes/urlhelper.php b/classes/urlhelper.php index bb51f5d06..f8fdd7de9 100644 --- a/classes/urlhelper.php +++ b/classes/urlhelper.php @@ -462,7 +462,11 @@ class UrlHelper { } if (!$contents) { - self::$fetch_last_error = curl_errno($ch) . " " . curl_error($ch); + if (curl_errno($ch) === 0) { + self::$fetch_last_error = 'Successful response, but no content was received.'; + } else { + self::$fetch_last_error = curl_errno($ch) . " " . curl_error($ch); + } curl_close($ch); return false; } @@ -578,6 +582,11 @@ class UrlHelper { return false; } + if (!$data) { + self::$fetch_last_error = 'Successful response, but no content was received.'; + return false; + } + $is_gzipped = RSSUtils::is_gzipped($data); if ($is_gzipped && $data) {