mirror of
https://github.com/friendica/friendica
synced 2025-05-24 17:44:12 +02:00
Fix various Notices
This commit is contained in:
parent
9b19fb9b4d
commit
644f312896
7 changed files with 12 additions and 10 deletions
|
@ -2757,12 +2757,14 @@ class Contact
|
|||
return null;
|
||||
}
|
||||
|
||||
public static function removeFollower($importer, $contact)
|
||||
public static function removeFollower(array $contact)
|
||||
{
|
||||
if (($contact['rel'] == self::FRIEND) || ($contact['rel'] == self::SHARING)) {
|
||||
if (!empty($contact['rel']) && (($contact['rel'] == self::FRIEND) || ($contact['rel'] == self::SHARING))) {
|
||||
DBA::update('contact', ['rel' => self::SHARING], ['id' => $contact['id']]);
|
||||
} else {
|
||||
} elseif (!empty($contact['id'])) {
|
||||
self::remove($contact['id']);
|
||||
} else {
|
||||
DI::logger()->info('Couldn\'t remove follower because of invalid contact array', ['contact' => $contact]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue