From: Hypolite Petovan Date: Sat, 24 Sep 2022 14:18:41 +0000 (-0400) Subject: Check for network key existence before calling Probe::isProbable in Model\Contact X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6ca725e5b698cc70cf4ad2ba26438d92a35050b2;p=friendica.git Check for network key existence before calling Probe::isProbable in Model\Contact - Address https://github.com/friendica/friendica/issues/11630#issuecomment-1253225607 --- diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 9e363bf372..a035d0021d 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -3388,7 +3388,7 @@ class Contact if (empty($contact['id']) && Network::isValidHttpUrl($url)) { Worker::add(PRIORITY_LOW, 'AddContact', 0, $url); ++$added; - } elseif (Probe::isProbable($contact['network']) && ($contact['next-update'] < DateTimeFormat::utcNow())) { + } elseif (!empty($contact['network']) && Probe::isProbable($contact['network']) && ($contact['next-update'] < DateTimeFormat::utcNow())) { Worker::add(['priority' => PRIORITY_LOW, 'dont_fork' => true], 'UpdateContact', $contact['id']); ++$updated; } else {