]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Xrd.php
Merge pull request #12782 from annando/c2s-2
[friendica.git] / src / Module / Xrd.php
index 29641482f625b86a41a1a7050a6fcb98e89c9c58..ad2b25902567d238f1d5f663366f162140d9f251 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -230,9 +230,7 @@ class Xrd extends BaseModule
        {
                $baseURL = $this->baseUrl->get();
 
-               $xml = null;
-
-               XML::fromArray([
+               $xmlString = XML::fromArray([
                        'XRD' => [
                                '@attributes' => [
                                        'xmlns'    => 'http://docs.oasis-open.org/ns/xri/xrd-1.0',
@@ -319,10 +317,10 @@ class Xrd extends BaseModule
                                        ]
                                ],
                        ],
-               ], $xml);
+               ]);
 
                header('Access-Control-Allow-Origin: *');
 
-               System::httpExit($xml->saveXML(), Response::TYPE_XML, 'application/xrd+xml');
+               System::httpExit($xmlString, Response::TYPE_XML, 'application/xrd+xml');
        }
 }