don't parse garbage in phase2 of dfrn_deliver either

This commit is contained in:
Friendika 2011-02-03 04:19:05 -08:00
parent a4cbdc2414
commit 01cd7cc9f2

View file

@ -894,6 +894,13 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
if((! $curl_stat) || (! strlen($xml))) if((! $curl_stat) || (! strlen($xml)))
return(-1); // timed out return(-1); // timed out
if(strpos($xml,'<?xml') === false) {
logger('dfrn_deliver: phase 2: no valid XML returned');
logger('dfrn_deliver: phase 2: returned XML: ' . $xml, LOGGER_DATA);
return 3;
}
$res = simplexml_load_string($xml); $res = simplexml_load_string($xml);
return $res->status; return $res->status;