From 5579dc88abee21adbb3654ea5e4b9941d12af6a6 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 20 Apr 2023 08:21:37 +0200 Subject: Better XPath failure (#5317) Report feeds as errored for more cases --- lib/lib_rss.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/lib_rss.php') diff --git a/lib/lib_rss.php b/lib/lib_rss.php index de9ca421e..fcdd8d787 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -485,8 +485,7 @@ function httpGet(string $url, string $cachePath, string $type = 'html', array $a Minz_Log::warning('Error fetching content: HTTP code ' . $c_status . ': ' . $c_error . ' ' . $url); $body = ''; // TODO: Implement HTTP 410 Gone - } - if (!is_string($body)) { + } elseif (!is_string($body) || strlen($body) === 0) { $body = ''; } else { $body = enforceHttpEncoding($body, $c_content_type); -- cgit v1.2.3