Browse Source

ISLANDORA-193: The code now creates a DOMDocument and calls loadXML() on that instance to prevent the warning.

pull/105/head
Nigel Banks 14 years ago
parent
commit
51f477b647
  1. 8
      XMLDatastream.inc

8
XMLDatastream.inc

@ -96,7 +96,13 @@ abstract class XMLDatastream {
$this->dsid = $dsid;
if ($xmlStr !== NULL) {
$this->xml = (is_object($xmlStr) && get_class($xmlStr) == DOMDocument) ? $xmlStr : DOMDocument::loadXML($xmlStr);
if(is_object($xmlStr) && get_class($xmlStr) == DOMDocument) {
$this->xml = $xmlStr;
}
else {
$this->xml = new DOMDocument();
$this->xml->loadXML($xmlStr);
}
}
}

Loading…
Cancel
Save