Skip to content

Commit

Permalink
Move tags init to prevent tag keys persisting. (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
heathstannard authored Mar 27, 2023
1 parent 688b469 commit c263e1f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/SitemapParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -404,12 +404,11 @@ protected function parseJson($type, \SimpleXMLElement $json)
return false;
}

$nameSpaces = $json->getDocNamespaces();
$nameSpaces = $json->getDocNamespaces();

if (!empty($nameSpaces)) {
$tags = ["namespaces" => []];

foreach ($json->$type as $node) {
$tags = ["namespaces" => []];
foreach ($nameSpaces as $nameSpace => $value) {
if ($nameSpace != "") {
$tags["namespaces"] = array_merge(
Expand Down

0 comments on commit c263e1f

Please # to comment.