]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/GContact.php
First batch of notes for the 2020.03 CHANGELOG
[friendica.git] / src / Model / GContact.php
index 59c84bc4907b62a0950d22cf4b353441eb5c5062..2606edb9e43803fd4dc2a3349267602a150aa095 100644 (file)
@@ -1343,14 +1343,18 @@ class GContact
                        foreach ($contacts as $contact) {
                                $gcontact = DBA::selectFirst('gcontact', ['id'], ['nurl' => Strings::normaliseLink(($contact))]);
                                if (DBA::isResult($gcontact)) {
+                                       $fields = [];
                                        if (in_array($contact, $followers)) {
                                                $fields = ['gcid' => $gcid, 'follower-gcid' => $gcontact['id']];
                                        } elseif (in_array($contact, $followings)) {
                                                $fields = ['gcid' => $gcontact['id'], 'follower-gcid' => $gcid];
                                        }
-                                       Logger::info('Set relation between contacts', $fields);
-                                       DBA::update('gfollower', ['deleted' => false], $fields, true);
-                                       continue;
+
+                                       if (!empty($fields)) {
+                                               Logger::info('Set relation between contacts', $fields);
+                                               DBA::update('gfollower', ['deleted' => false], $fields, true);
+                                               continue;
+                                       }
                                }
 
                                if (!Network::isUrlBlocked($contact)) {