]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OStatus/lib/magicenvelope.php
MagicEnvelope called DOMDocument::loadXML statically
[quix0rs-gnu-social.git] / plugins / OStatus / lib / magicenvelope.php
index 9e02f5eab5e3f8963ae7020bb3223058a86f8498..dfd3abaeabd401cc6852e6721b59474a19eddc17 100644 (file)
@@ -50,8 +50,8 @@ class MagicEnvelope
      */
     public function __construct($xml=null) {
         if (!empty($xml)) {
-            $dom = DOMDocument::loadXML($xml);
-            if (!$dom instanceof DOMDocument) {
+            $dom = new DOMDocument();
+            if (!$dom->loadXML($xml)) {
                 throw new ServerException('Tried to load malformed XML as DOM');
             } elseif (!$this->fromDom($dom)) {
                 throw new ServerException('Could not load MagicEnvelope from DOM');