Skip to content

Commit ed04b7d

Browse files
committed
Bugfix: use the correct DOMElement to create the object
1 parent 32138d9 commit ed04b7d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/ExtendableElementTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ protected static function getChildElementsFromXML(DOMElement $xml, NS|array $nam
6868
}
6969

7070
$handler = $registry->getElementHandler($elt->namespaceURI, $elt->localName);
71-
$elements[] = ($handler === null) ? Chunk::fromXML($xml) : $handler::fromXML($xml);
71+
$elements[] = ($handler === null) ? Chunk::fromXML($elt) : $handler::fromXML($elt);
7272
}
7373
} else {
7474
// Array must be non-empty and cannot contain ##any or ##other
@@ -97,7 +97,7 @@ protected static function getChildElementsFromXML(DOMElement $xml, NS|array $nam
9797
}
9898

9999
$handler = $registry->getElementHandler($elt->namespaceURI, $elt->localName);
100-
$elements[] = ($handler === null) ? Chunk::fromXML($xml) : $handler::fromXML($xml);
100+
$elements[] = ($handler === null) ? Chunk::fromXML($elt) : $handler::fromXML($elt);
101101
}
102102
}
103103

0 commit comments

Comments
 (0)