summaryrefslogtreecommitdiffstats
path: root/Services/Yadis/XML.php
diff options
context:
space:
mode:
authortailor <cygnus@janrain.com>2007-01-09 22:06:35 +0000
committertailor <cygnus@janrain.com>2007-01-09 22:06:35 +0000
commit1e1f84afbec284dd3bd8a11dc4c19fe67143b2b4 (patch)
tree05d2399016ffba6f85f65298a7e50f620c134598 /Services/Yadis/XML.php
parent235c1f3ab10f1ace01d64daf65fef073dad45721 (diff)
downloadphp-openid-1e1f84afbec284dd3bd8a11dc4c19fe67143b2b4.zip
php-openid-1e1f84afbec284dd3bd8a11dc4c19fe67143b2b4.tar.gz
php-openid-1e1f84afbec284dd3bd8a11dc4c19fe67143b2b4.tar.bz2
[project @ Add tests for message form markup generation]
Diffstat (limited to 'Services/Yadis/XML.php')
-rw-r--r--Services/Yadis/XML.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/Services/Yadis/XML.php b/Services/Yadis/XML.php
index 8e1d237..e794126 100644
--- a/Services/Yadis/XML.php
+++ b/Services/Yadis/XML.php
@@ -170,6 +170,11 @@ class Services_Yadis_domxml extends Services_Yadis_XMLParser {
$result = @$this->xpath->xpath_eval($xpath);
}
+ if (!$result) {
+ $n = array();
+ return $n;
+ }
+
if (!$result->nodeset) {
$n = array();
return $n;
@@ -257,6 +262,10 @@ class Services_Yadis_dom extends Services_Yadis_XMLParser {
$n = array();
+ if (!$result) {
+ return $n;
+ }
+
for ($i = 0; $i < $result->length; $i++) {
$n[] = $result->item($i);
}