X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fatom10feed.php;h=5e17b20d3ab8816507ea4ebe96fb99786a97e6f3;hb=ca2a88545d353f0e887f48fe0e3bd43b505031ca;hp=14a3beb83e3116dcd539fd6932a0cd16df6cf10c;hpb=07f145049e8f0de848255d7b21ddb64866db0c83;p=quix0rs-gnu-social.git diff --git a/lib/atom10feed.php b/lib/atom10feed.php index 14a3beb83e..5e17b20d3a 100644 --- a/lib/atom10feed.php +++ b/lib/atom10feed.php @@ -78,7 +78,7 @@ class Atom10Feed extends XMLStringer $this->authors = array(); $this->links = array(); $this->entries = array(); - $this->addNamespace('xmlns', 'http://www.w3.org/2005/Atom'); + $this->addNamespace('', 'http://www.w3.org/2005/Atom'); } /** @@ -162,7 +162,14 @@ class Atom10Feed extends XMLStringer { $this->xw->startDocument('1.0', 'UTF-8'); $commonAttrs = array('xml:lang' => 'en-US'); - $commonAttrs = array_merge($commonAttrs, $this->namespaces); + foreach ($this->namespaces as $prefix => $uri) { + if ($prefix == '') { + $attr = 'xmlns'; + } else { + $attr = 'xmlns:' . $prefix; + } + $commonAttrs[$attr] = $uri; + } $this->elementStart('feed', $commonAttrs); $this->element('id', null, $this->id);