|
|
@@ -318,7 +318,7 @@ class Xml
|
|
|
$isNamespace = strpos($key, 'xmlns:');
|
|
|
if ($isNamespace !== false) {
|
|
|
/** @psalm-suppress PossiblyUndefinedMethod */
|
|
|
- $node->setAttributeNS('http://www.w3.org/2000/xmlns/', $key, $value);
|
|
|
+ $node->setAttributeNS('http://www.w3.org/2000/xmlns/', $key, (string)$value);
|
|
|
continue;
|
|
|
}
|
|
|
if ($key[0] !== '@' && $format === 'tags') {
|
|
|
@@ -327,7 +327,7 @@ class Xml
|
|
|
// https://www.w3.org/TR/REC-xml/#syntax
|
|
|
// https://bugs.php.net/bug.php?id=36795
|
|
|
$child = $dom->createElement($key, '');
|
|
|
- $child->appendChild(new DOMText($value));
|
|
|
+ $child->appendChild(new DOMText((string)$value));
|
|
|
} else {
|
|
|
$child = $dom->createElement($key, (string)$value);
|
|
|
}
|