mirror of
https://github.com/friendica/friendica
synced 2024-11-10 06:22:53 +00:00
Merge pull request #11922 from MrPetovan/bug/notices
Ward against missing keys in Model\APContact::isRelay
This commit is contained in:
commit
b00947025a
1 changed files with 3 additions and 3 deletions
|
@ -577,15 +577,15 @@ class APContact
|
|||
*/
|
||||
public static function isRelay(array $apcontact): bool
|
||||
{
|
||||
if ($apcontact['nick'] != 'relay') {
|
||||
if (empty($apcontact['nick']) || $apcontact['nick'] != 'relay') {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($apcontact['type'] == 'Application') {
|
||||
if (!empty($apcontact['type']) && $apcontact['type'] == 'Application') {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (in_array($apcontact['type'], ['Group', 'Service']) && is_null($apcontact['outbox'])) {
|
||||
if (!empty($apcontact['type']) && in_array($apcontact['type'], ['Group', 'Service']) && is_null($apcontact['outbox'])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue