From 1818fc11a52dee85f5fd28e4853ee266116c44ad Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 23 Dec 2021 17:32:44 +0300 Subject: [PATCH] fetch: return HTTP code when no curl_error() is available --- classes/urlhelper.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/classes/urlhelper.php b/classes/urlhelper.php index 9696c16db..9ac7781ef 100644 --- a/classes/urlhelper.php +++ b/classes/urlhelper.php @@ -419,6 +419,8 @@ class UrlHelper { if (curl_errno($ch) != 0) { self::$fetch_last_error .= "; " . curl_errno($ch) . " " . curl_error($ch); + } else { + self::$fetch_last_error = "HTTP Code: $http_code "; } self::$fetch_last_error_content = $contents;