Fixes several notices

This commit is contained in:
Michael 2020-09-19 03:16:26 +00:00
parent 2a402ef5ed
commit 84a9a5b174
3 changed files with 11 additions and 8 deletions

View file

@ -129,9 +129,12 @@ class Mail
}
$me = DBA::selectFirst('contact', [], ['uid' => local_user(), 'self' => true]);
$contact = DBA::selectFirst('contact', [], ['id' => $recipient, 'uid' => local_user()]);
if (!DBA::isResult($me)) {
return -2;
}
if (!(count($me) && (count($contact)))) {
$contact = DBA::selectFirst('contact', [], ['id' => $recipient, 'uid' => local_user()]);
if (!DBA::isResult($contact)) {
return -2;
}