diff options
author | Sarven Capadisli <csarven@status.net> | 2010-03-03 22:58:28 -0500 |
---|---|---|
committer | Sarven Capadisli <csarven@status.net> | 2010-03-03 22:58:28 -0500 |
commit | 239750aa0001b0b1ea5076f6f71ed6ffbb433c31 (patch) | |
tree | efc9a842df9238dd1b6fc81a88a6d5cdac9e8c73 | |
parent | de687d00c0ebe8bf5d185b7037df7f1edfd368a3 (diff) | |
parent | 24835c1164251e48037f6ddee14e4b696fe57320 (diff) |
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
-rw-r--r-- | plugins/OStatus/lib/xrd.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/OStatus/lib/xrd.php b/plugins/OStatus/lib/xrd.php index f00e1f809..aa13ef024 100644 --- a/plugins/OStatus/lib/xrd.php +++ b/plugins/OStatus/lib/xrd.php @@ -57,6 +57,9 @@ class XRD throw new Exception("Invalid XML"); } $xrd_element = $dom->getElementsByTagName('XRD')->item(0); + if (!$xrd_element) { + throw new Exception("Invalid XML, missing XRD root"); + } // Check for host-meta host $host = $xrd_element->getElementsByTagName('Host')->item(0); |