Skip to content

A free, self-hostable news aggregator…

OPML export fix empty attributes (#5559)

Alexandre Alapetitec49c29a561e7
diff --git a/app/views/helpers/export/opml.phtml b/app/views/helpers/export/opml.phtml
index 5acdff374..8b067b8ff 100644
--- a/app/views/helpers/export/opml.phtml
+++ b/app/views/helpers/export/opml.phtml
@@ -59,6 +59,9 @@ function feedsToOutlines(array $feeds, bool $excludeMutedFeeds = false): array {
$outline['frss:cssFullContentFilter'] = $feed->attributes('path_entries_filter');
}
+ // Remove null attributes
+ $outline = array_filter($outline, static function (?string $value) { return $value !== null; });
+
$outlines[] = $outline;
}