From: Hypolite Petovan Date: Sun, 20 Nov 2022 00:08:44 +0000 (-0500) Subject: Ensure IEMail::getMessage returns a string X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a147038c2eb4685c101a207289d0ec71f6a0efec;p=friendica.git Ensure IEMail::getMessage returns a string --- diff --git a/src/Object/EMail/IEmail.php b/src/Object/EMail/IEmail.php index f1e66a224f..9fd1fe3da6 100644 --- a/src/Object/EMail/IEmail.php +++ b/src/Object/EMail/IEmail.php @@ -80,7 +80,7 @@ interface IEmail extends JsonSerializable * * @return string */ - function getMessage(bool $plain = false); + function getMessage(bool $plain = false): string; /** * Gets the additional mail header array diff --git a/src/Object/Email.php b/src/Object/Email.php index 57eb0c17e9..4d5a11715c 100644 --- a/src/Object/Email.php +++ b/src/Object/Email.php @@ -110,12 +110,12 @@ class Email implements IEmail /** * {@inheritDoc} */ - public function getMessage(bool $plain = false) + public function getMessage(bool $plain = false): string { if ($plain) { return $this->msgText; } else { - return $this->msgHtml; + return $this->msgHtml ?? ''; } }