summaryrefslogtreecommitdiff
path: root/plugins/OStatus/lib/xrd.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-03-23 14:20:14 -0700
committerBrion Vibber <brion@pobox.com>2010-03-23 14:20:14 -0700
commit2ae61307bb631af4153d317f27332b93f88d3585 (patch)
tree9736179545489b74fe6a4331c4932de246a04b0d /plugins/OStatus/lib/xrd.php
parent80ed39132890a78c9bade22c43b25781fe7c12c8 (diff)
parentdf8c9090c0deabe20b804e0fd0766d6b86b7968f (diff)
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'plugins/OStatus/lib/xrd.php')
-rw-r--r--plugins/OStatus/lib/xrd.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/OStatus/lib/xrd.php b/plugins/OStatus/lib/xrd.php
index aa13ef024..34b28790b 100644
--- a/plugins/OStatus/lib/xrd.php
+++ b/plugins/OStatus/lib/xrd.php
@@ -53,7 +53,14 @@ class XRD
$xrd = new XRD();
$dom = new DOMDocument();
- if (!$dom->loadXML($xml)) {
+
+ // Don't spew XML warnings to output
+ $old = error_reporting();
+ error_reporting($old & ~E_WARNING);
+ $ok = $dom->loadXML($xml);
+ error_reporting($old);
+
+ if (!$ok) {
throw new Exception("Invalid XML");
}
$xrd_element = $dom->getElementsByTagName('XRD')->item(0);