From 13f76acef5362d15c71ae1ac6350cc3df5e25e43 Mon Sep 17 00:00:00 2001 From: trin4ik Date: Sat, 24 Dec 2022 16:43:51 +0300 Subject: [PATCH] fix deprecated `passing null as string type` (#204) --- src/ArrayToXml.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ArrayToXml.php b/src/ArrayToXml.php index 1c6260d..e08a150 100644 --- a/src/ArrayToXml.php +++ b/src/ArrayToXml.php @@ -241,7 +241,7 @@ protected function isArrayAllKeySequential(array | string | null $value): bool protected function addAttributes(DOMElement $element, array $data): void { foreach ($data as $attrKey => $attrVal) { - $element->setAttribute($attrKey, $attrVal); + $element->setAttribute($attrKey, $attrVal ?? ''); } }