aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-08-03 21:57:00 +0200
committerGravatar GitHub <noreply@github.com> 2023-08-03 21:57:00 +0200
commitc49c29a561e73d791c7ea1df84c661e052b46781 (patch)
tree496033c62cd6543e091f01cac2442d1c1616814e
parent4039f6c9a4bc1636d298d0c05c678f4e1215e846 (diff)
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
-rw-r--r--app/views/helpers/export/opml.phtml3
1 files changed, 3 insertions, 0 deletions
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;
}