Skip to content

Commit 13f76ac

Browse files
authored
fix deprecated passing null as string type (#204)
1 parent 6db7e9d commit 13f76ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ArrayToXml.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ protected function isArrayAllKeySequential(array | string | null $value): bool
241241
protected function addAttributes(DOMElement $element, array $data): void
242242
{
243243
foreach ($data as $attrKey => $attrVal) {
244-
$element->setAttribute($attrKey, $attrVal);
244+
$element->setAttribute($attrKey, $attrVal ?? '');
245245
}
246246
}
247247

0 commit comments

Comments
 (0)