Check for network key existence before calling Probe::isProbable in Model\Contact

- Address https://github.com/friendica/friendica/issues/11630#issuecomment-1253225607
This commit is contained in:
Hypolite Petovan 2022-09-24 10:18:41 -04:00
parent be9bbe1709
commit 6ca725e5b6

View file

@ -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 {