Avoid warning in gcontact.php
This commit is contained in:
parent
96b5df1aed
commit
e1786b6747
|
@ -1343,15 +1343,19 @@ 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)) {
|
||||||
|
$field = [];
|
||||||
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];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!empty($fields)) {
|
||||||
Logger::info('Set relation between contacts', $fields);
|
Logger::info('Set relation between contacts', $fields);
|
||||||
DBA::update('gfollower', ['deleted' => false], $fields, true);
|
DBA::update('gfollower', ['deleted' => false], $fields, true);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!Network::isUrlBlocked($contact)) {
|
if (!Network::isUrlBlocked($contact)) {
|
||||||
Logger::info('Discover new AP contact', ['url' => $contact]);
|
Logger::info('Discover new AP contact', ['url' => $contact]);
|
||||||
|
|
Loading…
Reference in a new issue