From 24b1e26406afe1245d07b62422dcd5144d939f70 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Fri, 10 Jul 2015 23:24:50 +0200 Subject: [PATCH] MagicEnvelope called DOMDocument::loadXML statically but apparently we shouldn't do this, despite recommended on https://secure.php.net/manual/en/domdocument.loadxml.php --- plugins/OStatus/lib/magicenvelope.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/OStatus/lib/magicenvelope.php b/plugins/OStatus/lib/magicenvelope.php index 9e02f5eab5..dfd3abaeab 100644 --- a/plugins/OStatus/lib/magicenvelope.php +++ b/plugins/OStatus/lib/magicenvelope.php @@ -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');