Fix PHPStan error in Security class

This commit is contained in:
Art4 2025-02-25 07:59:39 +00:00
parent f6d5cd039e
commit 83f64b4931

View file

@ -45,7 +45,8 @@ class Security
return true;
} elseif ($verified === 1) {
return false;
} else {
}
$user = User::getById($owner);
if (!$user || $user['blockwall']) {
$verified = 1;
@ -53,7 +54,7 @@ class Security
}
$contact = Contact::getById($cid);
if ($contact || $contact['blocked'] || $contact['readonly'] || $contact['pending']) {
if (!is_array($contact) || $contact['blocked'] || $contact['readonly'] || $contact['pending']) {
$verified = 1;
return false;
}
@ -65,7 +66,6 @@ class Security
$verified = 1;
}
}
}
return false;
}