There was an error while loading. Please reload this page.
passing null as string type
1 parent 6db7e9d commit 13f76acCopy full SHA for 13f76ac
src/ArrayToXml.php
@@ -241,7 +241,7 @@ protected function isArrayAllKeySequential(array | string | null $value): bool
241
protected function addAttributes(DOMElement $element, array $data): void
242
{
243
foreach ($data as $attrKey => $attrVal) {
244
- $element->setAttribute($attrKey, $attrVal);
+ $element->setAttribute($attrKey, $attrVal ?? '');
245
}
246
247
0 commit comments