]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
MagicEnvelope called DOMDocument::loadXML statically
authorMikael Nordfeldth <mmn@hethane.se>
Fri, 10 Jul 2015 21:24:50 +0000 (23:24 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Fri, 10 Jul 2015 21:24:50 +0000 (23:24 +0200)
but apparently we shouldn't do this, despite recommended on https://secure.php.net/manual/en/domdocument.loadxml.php

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');