Merge pull request #8413 from annando/fix-warning
Avoid notice in gcontact.php
This commit is contained in:
commit
d92b9a79e2
1 changed files with 7 additions and 3 deletions
|
@ -1343,14 +1343,18 @@ class GContact
|
||||||
foreach ($contacts as $contact) {
|
foreach ($contacts as $contact) {
|
||||||
$gcontact = DBA::selectFirst('gcontact', ['id'], ['nurl' => Strings::normaliseLink(($contact))]);
|
$gcontact = DBA::selectFirst('gcontact', ['id'], ['nurl' => Strings::normaliseLink(($contact))]);
|
||||||
if (DBA::isResult($gcontact)) {
|
if (DBA::isResult($gcontact)) {
|
||||||
|
$fields = [];
|
||||||
if (in_array($contact, $followers)) {
|
if (in_array($contact, $followers)) {
|
||||||
$fields = ['gcid' => $gcid, 'follower-gcid' => $gcontact['id']];
|
$fields = ['gcid' => $gcid, 'follower-gcid' => $gcontact['id']];
|
||||||
} elseif (in_array($contact, $followings)) {
|
} elseif (in_array($contact, $followings)) {
|
||||||
$fields = ['gcid' => $gcontact['id'], 'follower-gcid' => $gcid];
|
$fields = ['gcid' => $gcontact['id'], 'follower-gcid' => $gcid];
|
||||||
}
|
}
|
||||||
Logger::info('Set relation between contacts', $fields);
|
|
||||||
DBA::update('gfollower', ['deleted' => false], $fields, true);
|
if (!empty($fields)) {
|
||||||
continue;
|
Logger::info('Set relation between contacts', $fields);
|
||||||
|
DBA::update('gfollower', ['deleted' => false], $fields, true);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Network::isUrlBlocked($contact)) {
|
if (!Network::isUrlBlocked($contact)) {
|
||||||
|
|
Loading…
Reference in a new issue