We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 5f32cf32 authored by Brion Vibber's avatar Brion Vibber

Don't spew XML parse warnings to output when checking a remote XRD page

parent 7dc24b4c
......@@ -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);
if (!$ok) {
throw new Exception("Invalid XML");
$xrd_element = $dom->getElementsByTagName('XRD')->item(0);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment