Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/news.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Brahmer <info@b-brahmer.de>2022-08-18 22:33:51 +0300
committerGitHub <noreply@github.com>2022-08-18 22:33:51 +0300
commit753ae93c5314110d4161080e6ae7add82386ffb2 (patch)
treea9f22c05f88705787446d10c5f6ac18811a468cf
parentf380f3cf6156e743e5a5f68bfac74f4efafb565c (diff)
improve implementationfix/php8.1_depreciation
Co-authored-by: anoy. <anoymouserver@users.noreply.github.com> Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
-rw-r--r--lib/Utility/OPMLExporter.php18
1 files changed, 7 insertions, 11 deletions
diff --git a/lib/Utility/OPMLExporter.php b/lib/Utility/OPMLExporter.php
index bb813daf8..9068cd0cb 100644
--- a/lib/Utility/OPMLExporter.php
+++ b/lib/Utility/OPMLExporter.php
@@ -91,19 +91,15 @@ 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;