Skip to content

Commit

Permalink
Backport changes from spatie#204
Browse files Browse the repository at this point in the history
  • Loading branch information
weirdan committed Dec 24, 2022
1 parent df0f116 commit 7f98c30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ArrayToXml.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ protected function isArrayAllKeySequential($value)
protected function addAttributes(DOMElement $element, array $data)
{
foreach ($data as $attrKey => $attrVal) {
$element->setAttribute($attrKey, $attrVal);
$element->setAttribute($attrKey, $attrVal ?? '');
}
}

Expand Down

0 comments on commit 7f98c30

Please sign in to comment.