From 5fe428d3e4dc7e9745897e00838490a97286c042 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 21 Jun 2022 13:32:04 +0200 Subject: [PATCH] Fixed: - PHPUnit\Framework\Error\Notice: Undefined index: language in /.../src/Util/EMailer/MailBuilder.php on line 122 --- src/Util/EMailer/MailBuilder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Util/EMailer/MailBuilder.php b/src/Util/EMailer/MailBuilder.php index e6b745b979..321bdc9e6b 100644 --- a/src/Util/EMailer/MailBuilder.php +++ b/src/Util/EMailer/MailBuilder.php @@ -119,7 +119,7 @@ abstract class MailBuilder { $this->recipientUid = $user['uid'] ?? 0; try { - $this->l10n = $user['language'] ? $this->l10n->withLang($user['language']) : $this->l10n; + $this->l10n = isset($user['language']) ? $this->l10n->withLang($user['language']) : $this->l10n; } catch (Exception $e) { $this->logger->warning('cannot use language.', ['user' => $user, 'exception' => $e]); } -- 2.39.5