robrichards/xmlseclibs

XMLSecurityDSig::addReference

Opened this issue · 0 comments

We're upgrading from an ancient version of xmlseclibs due to the mcrypt changes. With the new PHPDoc in 3.0 we're now getting errors reported on the $node parameter to XMLSecurityDSig::addReference when we attempt to pass in a DOMElement becuase your PHPDoc spcifies only a DOMDocument. Sadly addRefInternal also specifies only a DOMDocument but has code that specifically allows other types and given the methods being called they must be a DOMElement.

        if (! $node instanceof DOMDocument) {
           //...
                $uri = $prefix_ns ? $node->getAttributeNS($prefix_ns, $id_name) : $node->getAttribute($id_name);

Here's hoping that you can change the signature from

@param DOMDocument $node

to

@param DOMDocument|DOMElement $node

Version: 3.0.1
Reference: d937712