From c49c29a561e73d791c7ea1df84c661e052b46781 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 3 Aug 2023 21:57:00 +0200 Subject: OPML export fix empty attributes (#5559) Fix: > Deprecated: DOMElement::setAttributeNS(): Passing null to parameter #3 ($value) of type string is deprecated in /var/www/FreshRSS/lib/marienfressinaud/lib_opml/src/LibOpml/LibOpml.php on line 680 --- app/views/helpers/export/opml.phtml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/views/helpers') 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; } -- cgit v1.2.3