if xml doesn't parse, don't process it further

This commit is contained in:
Friendika 2011-05-22 06:05:01 -07:00
parent 8510748b19
commit f4e47f168f

View file

@ -1508,6 +1508,8 @@ function lrdd($uri) {
logger('lrdd: host_meta: ' . $xml, LOGGER_DATA); logger('lrdd: host_meta: ' . $xml, LOGGER_DATA);
$h = parse_xml_string($xml); $h = parse_xml_string($xml);
if(! $h)
return array();
$arr = convert_xml_element_to_array($h); $arr = convert_xml_element_to_array($h);
@ -1672,6 +1674,9 @@ function fetch_xrd_links($url) {
logger('fetch_xrd_links: ' . $xml, LOGGER_DATA); logger('fetch_xrd_links: ' . $xml, LOGGER_DATA);
$h = parse_xml_string($xml); $h = parse_xml_string($xml);
if(! $h)
return array();
$arr = convert_xml_element_to_array($h); $arr = convert_xml_element_to_array($h);
$links = array(); $links = array();