Skip to content

Commit 1477433

Browse files
committed
chore: Fix small psalm reported issues
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 parent b029c1d commit 1477433

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/Services/Request.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ protected function craftEmailTo(IUser $admin, IEMailTemplate $template): bool {
8989
$senderName = $this->defaults->getName();
9090

9191
$adminEmail = $admin->getEMailAddress();
92-
if (!$adminEmail) {
92+
if ($adminEmail === null || $adminEmail === '') {
9393
return false;
9494
}
9595

@@ -141,7 +141,7 @@ protected function getDeletionTemplate(IUser $admin): IEMailTemplate {
141141
}
142142

143143
protected function getAdmins(): array {
144-
$admins = $this->groupManager->get('admin')->searchUsers('');
144+
$admins = $this->groupManager->get('admin')?->searchUsers('') ?? [];
145145
$admins = array_filter($admins, function (IUser $admin) {
146146
return $admin->getEMailAddress() !== null;
147147
});

0 commit comments

Comments
 (0)