Skip to content

Commit

Permalink
Bugfix: properly treat Name-attribute as optional
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Sep 23, 2024
1 parent fe27509 commit 90528bc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/XML/wsp/Policy.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,10 @@ public static function fromXML(DOMElement $xml): static
public function toXML(DOMElement $parent = null): DOMElement
{
$e = parent::toXML($parent);
$e->setAttribute('Name', $this->getName());

if ($this->getName() !== null) {
$e->setAttribute('Name', $this->getName());
}

$this->getId()?->toXML($e);

Expand Down

0 comments on commit 90528bc

Please sign in to comment.