1
0
Fork 0

Merge pull request #7622 from annando/fix-notice

Fix a notice because of invalid return data
This commit is contained in:
Hypolite Petovan 2019-09-13 15:13:53 -04:00 committed by GitHub
commit 2e0e1538d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -301,6 +301,15 @@ class OnePoll
$res = XML::parseString($handshake_xml); $res = XML::parseString($handshake_xml);
if (!is_object($res)) {
Logger::info('Unparseable response', ['url' => $url]);
$fields = ['last-update' => $updated, 'failure_update' => $updated];
self::updateContact($contact, $fields);
Contact::markForArchival($contact);
return false;
}
if (intval($res->status) == 1) { if (intval($res->status) == 1) {
// we may not be friends anymore. Will keep trying for one month. // we may not be friends anymore. Will keep trying for one month.
Logger::log("$url replied status 1 - marking for death "); Logger::log("$url replied status 1 - marking for death ");