Skip to content

Commit 0e52ca8

Browse files
committed
Avoid broken XML-output when no prefix is set (2)
1 parent b9b8684 commit 0e52ca8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Attribute.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function toXML(DOMElement $parent): DOMElement
108108
{
109109
$parent->setAttributeNS(
110110
$this->getNamespaceURI(),
111-
($this->getNamespacePrefix() !== null)
111+
($this->getNamespacePrefix() !== '')
112112
? ($this->getNamespacePrefix() . ':' . $this->getAttrName())
113113
: $this->getAttrName(),
114114
$this->getAttrValue(),

0 commit comments

Comments
 (0)