From 918af40f05ec246e65149704d27694d65598136d Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Mon, 15 Feb 2021 22:28:28 +0100 Subject: [PATCH] Harden EncryptAll check for empty email Reported by psalm For #25641 Signed-off-by: Roeland Jago Douma --- apps/encryption/lib/Crypto/EncryptAll.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/encryption/lib/Crypto/EncryptAll.php b/apps/encryption/lib/Crypto/EncryptAll.php index 3d18d8b3a5..a74e6bf08d 100644 --- a/apps/encryption/lib/Crypto/EncryptAll.php +++ b/apps/encryption/lib/Crypto/EncryptAll.php @@ -417,7 +417,7 @@ class EncryptAll { $recipientDisplayName = $recipient->getDisplayName(); $to = $recipient->getEMailAddress(); - if ($to === '') { + if ($to === '' || $to === null) { $noMail[] = $uid; continue; }