Skip to content

Commit

Permalink
Fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
barw4 committed Sep 5, 2024
1 parent 0dc7048 commit 82103ef
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/lib/Output/Generator/InMemory/Xml.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,14 @@ public function transformData(array $normalizedData): array
{
$topNodeName = array_key_first($normalizedData);
$data = array_filter(
$normalizedData[$topNodeName],
$normalizedData[$topNodeName] ?? [],
static fn (string $key): bool => str_starts_with($key, '@'),
ARRAY_FILTER_USE_KEY,
);
$data['#'] = $normalizedData[$topNodeName];

if ($topNodeName !== null) {
$data['#'] = $normalizedData[$topNodeName];
}

return $data;
}
Expand Down

0 comments on commit 82103ef

Please sign in to comment.