diff options
author | Benjamin Brahmer <info@b-brahmer.de> | 2022-08-19 11:26:04 +0200 |
---|---|---|
committer | Benjamin Brahmer <info@b-brahmer.de> | 2022-08-19 15:57:03 +0200 |
commit | 410a1e4d6b27812347255522fbf93e87bbf63fdc (patch) | |
tree | 086c2063287026ddbe19a390eaac5d4e27b9c4a7 /lib | |
parent | 1784406fa770abb066f9e7d9714e2ca49b9b0aae (diff) |
fixup for #1861
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Utility/OPMLExporter.php | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/lib/Utility/OPMLExporter.php b/lib/Utility/OPMLExporter.php index bb813daf8..dddd7bc32 100644 --- a/lib/Utility/OPMLExporter.php +++ b/lib/Utility/OPMLExporter.php @@ -91,19 +91,14 @@ class OPMLExporter { $feedOutline = $document->createElement('outline'); $attributes = [ - ['title', $feed->getTitle()], - ['text', $feed->getTitle()], - ['type', 'rss'], - ['xmlUrl', $feed->getUrl()], - ['htmlUrl', $feed->getLink()], + 'title' => $feed->getTitle(), + 'text' => $feed->getTitle(), + 'type' => 'rss', + 'xmlUrl' => $feed->getUrl(), + 'htmlUrl' => $feed->getLink(), ]; - - foreach ($attributes as $attribute) { - if (is_null($attribute[1])) { - $feedOutline->setAttribute($attribute[0], ""); - } else { - $feedOutline->setAttribute($attribute[0], $attribute[1]); - } + foreach ($attributes as $name => $value) { + $feedOutline->setAttribute($name, $value ?? ''); } return $feedOutline; |