aboutsummaryrefslogtreecommitdiff
path: root/lib/lib_rss.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-04-20 08:21:37 +0200
committerGravatar GitHub <noreply@github.com> 2023-04-20 08:21:37 +0200
commit5579dc88abee21adbb3654ea5e4b9941d12af6a6 (patch)
tree1a3b885f209b0c6822114839a6ea09e9f114bffa /lib/lib_rss.php
parentecd956c73608a699a8ebd177c68c740c4ca20af7 (diff)
Better XPath failure (#5317)
Report feeds as errored for more cases
Diffstat (limited to 'lib/lib_rss.php')
-rw-r--r--lib/lib_rss.php3
1 files changed, 1 insertions, 2 deletions
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);