mirror of
https://github.com/friendica/friendica
synced 2024-11-10 04:22:54 +00:00
ignore malformed xml before it hits the parser.
This commit is contained in:
parent
2ef6ad80a4
commit
e09d164882
1 changed files with 10 additions and 0 deletions
|
@ -115,6 +115,7 @@
|
|||
|
||||
logger('poller: handshake with url ' . $url . ' returns xml: ' . $xml, LOGGER_DATA);
|
||||
|
||||
|
||||
if(! $xml) {
|
||||
logger("poller: $url appears to be dead - marking for death ");
|
||||
// dead connection - might be a transient event, or this might
|
||||
|
@ -132,6 +133,15 @@
|
|||
continue;
|
||||
}
|
||||
|
||||
if(! strstr($xml,'<?xml')) {
|
||||
logger('poller: response from ' . $url . ' did not contain XML.');
|
||||
$r = q("UPDATE `contact` SET `last-update` = '%s' WHERE `id` = %d LIMIT 1",
|
||||
dbesc(datetime_convert()),
|
||||
intval($contact['id'])
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
$res = simplexml_load_string($xml);
|
||||
|
||||
|
|
Loading…
Reference in a new issue