From f4e47f168feb1075c30ba478e823f61dbcd26e02 Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 22 May 2011 06:05:01 -0700 Subject: [PATCH] if xml doesn't parse, don't process it further --- boot.php | 5 +++++ 1 file changed, 5 insertions(+) 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();