Avoid warning in gcontact.php

2022.09-rc
Michael 2020-03-12 17:31:28 +00:00
rodzic 96b5df1aed
commit e1786b6747
1 zmienionych plików z 7 dodań i 3 usunięć

Wyświetl plik

@ -1343,14 +1343,18 @@ class GContact
foreach ($contacts as $contact) {
$gcontact = DBA::selectFirst('gcontact', ['id'], ['nurl' => Strings::normaliseLink(($contact))]);
if (DBA::isResult($gcontact)) {
$field = [];
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)) {