Remove dependency to the second parameter of XML::fromArray

This commit is contained in:
Hypolite Petovan 2022-12-31 11:59:19 -05:00
parent 931ccde90d
commit 8bbf9e93c6
10 changed files with 23 additions and 35 deletions

View file

@ -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');
}
}