Skip to content

Commit

Permalink
Fix first row not printed with attributes.
Browse files Browse the repository at this point in the history
  • Loading branch information
saidatom committed Jun 20, 2023
1 parent 55caf34 commit 5e56693
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"require": {
"symfony/psr-http-message-bridge": "^2.1",
"picturae/oai-pmh": "^0.5.20",
"nyholm/psr7": "^1.4"
"nyholm/psr7": "^1.6"
}
}
4 changes: 3 additions & 1 deletion src/Plugin/views/style/Record.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,9 @@ public function render() {
// Getting all the elements.
$elements = $this->rowToXml->transform($row);

$element_or_null = array_shift($elements);
$element_or_null = [
array_keys($elements)[0] => reset($elements)
];
// Insure we're adding (union) arrays, not null.
$element = $element_or_null ? $element_or_null : array();
// Getting only the root elements, we need to remove the root elements
Expand Down

0 comments on commit 5e56693

Please sign in to comment.