diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/poller.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/poller.php b/include/poller.php index d97584ff9..ec1fef7a8 100644 --- a/include/poller.php +++ b/include/poller.php @@ -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); |