From 130225eb469105bd04a292150247c3a6cbdfc5d4 Mon Sep 17 00:00:00 2001 From: kenjis Date: Tue, 10 Jan 2023 19:52:21 +0900 Subject: [PATCH 1/2] style: break long line --- system/Email/Email.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/system/Email/Email.php b/system/Email/Email.php index d113398d5dab..488a5ee76f04 100644 --- a/system/Email/Email.php +++ b/system/Email/Email.php @@ -1539,7 +1539,11 @@ public function send($autoClear = true) $this->setReplyTo($this->headers['From']); } - if (empty($this->recipients) && ! isset($this->headers['To']) && empty($this->BCCArray) && ! isset($this->headers['Bcc']) && ! isset($this->headers['Cc'])) { + if ( + empty($this->recipients) && ! isset($this->headers['To']) + && empty($this->BCCArray) && ! isset($this->headers['Bcc']) + && ! isset($this->headers['Cc']) + ) { $this->setErrorMessage(lang('Email.noRecipients')); return false; From 97736e22b5ac20dd7a31f20825eb2a76004fffe3 Mon Sep 17 00:00:00 2001 From: kenjis Date: Tue, 10 Jan 2023 19:51:40 +0900 Subject: [PATCH 2/2] fix: Email config in the .env doesn't appear as expected Initialize typed properties. --- app/Config/Email.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Config/Email.php b/app/Config/Email.php index 729e8957f9ab..01350186a3e9 100644 --- a/app/Config/Email.php +++ b/app/Config/Email.php @@ -6,9 +6,9 @@ class Email extends BaseConfig { - public string $fromEmail; - public string $fromName; - public string $recipients; + public string $fromEmail = ''; + public string $fromName = ''; + public string $recipients = ''; /** * The "user agent" @@ -28,17 +28,17 @@ class Email extends BaseConfig /** * SMTP Server Address */ - public string $SMTPHost; + public string $SMTPHost = ''; /** * SMTP Username */ - public string $SMTPUser; + public string $SMTPUser = ''; /** * SMTP Password */ - public string $SMTPPass; + public string $SMTPPass = ''; /** * SMTP Port