]> git.mxchange.org Git - friendica.git/commitdiff
Check for network key existence before calling Probe::isProbable in Model\Contact
authorHypolite Petovan <hypolite@mrpetovan.com>
Sat, 24 Sep 2022 14:18:41 +0000 (10:18 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 24 Sep 2022 14:18:41 +0000 (10:18 -0400)
- Address https://github.com/friendica/friendica/issues/11630#issuecomment-1253225607

src/Model/Contact.php

index 9e363bf372a9209999280b7625305d1af619957d..a035d0021d9e3b3dece6a38cc499db3c2ea77112 100644 (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 {