]> git.mxchange.org Git - friendica.git/commitdiff
if xml doesn't parse, don't process it further
authorFriendika <info@friendika.com>
Sun, 22 May 2011 13:05:01 +0000 (06:05 -0700)
committerFriendika <info@friendika.com>
Sun, 22 May 2011 13:05:01 +0000 (06:05 -0700)
boot.php

index 0704c2305218013eb49ffe1fee1ae773e34e0895..9581541bd449eac2a9cba3374b86830dc24a991a 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -1508,6 +1508,8 @@ function lrdd($uri) {
        logger('lrdd: host_meta: ' . $xml, LOGGER_DATA);
 
        $h = parse_xml_string($xml);
+       if(! $h)
+               return array();
 
        $arr = convert_xml_element_to_array($h);
 
@@ -1672,6 +1674,9 @@ function fetch_xrd_links($url) {
 
        logger('fetch_xrd_links: ' . $xml, LOGGER_DATA);
        $h = parse_xml_string($xml);
+       if(! $h)
+               return array();
+
        $arr = convert_xml_element_to_array($h);
 
        $links = array();