]> git.mxchange.org Git - friendica.git/commitdiff
Fixed:
authorRoland Häder <roland@mxchange.org>
Tue, 21 Jun 2022 11:32:04 +0000 (13:32 +0200)
committerRoland Häder <roland@mxchange.org>
Tue, 21 Jun 2022 11:47:40 +0000 (13:47 +0200)
- PHPUnit\Framework\Error\Notice:  Undefined index: language in /.../src/Util/EMailer/MailBuilder.php on line 122

src/Util/EMailer/MailBuilder.php

index e6b745b97978c07d9eb171aaf5dd38e603dd9b16..321bdc9e6b0d1eac7e3dd0643d4f0ada47241627 100644 (file)
@@ -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]);
                }