From: Friendika Date: Sun, 22 May 2011 13:05:01 +0000 (-0700) Subject: if xml doesn't parse, don't process it further X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f4e47f168feb1075c30ba478e823f61dbcd26e02;p=friendica.git if xml doesn't parse, don't process it further --- diff --git a/boot.php b/boot.php index 0704c23052..9581541bd4 100644 --- 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();