From: nupplaPhil Date: Sun, 26 Jan 2020 19:41:53 +0000 (+0100) Subject: fix boolean field X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4efba4d0cf55711eeaa8076b75e4e49ae75f603f;p=friendica.git fix boolean field --- diff --git a/src/Object/EMail.php b/src/Object/EMail.php index 5985b3f3be..496729a15d 100644 --- a/src/Object/EMail.php +++ b/src/Object/EMail.php @@ -91,9 +91,9 @@ class EMail implements IEmail /** * {@inheritDoc} */ - public function getMessage(bool $text = false) + public function getMessage(bool $plain = false) { - if ($text) { + if ($plain) { return $this->msgText; } else { return $this->msgHtml; diff --git a/src/Object/EMail/IEmail.php b/src/Object/EMail/IEmail.php index cd654b9d32..24df41b156 100644 --- a/src/Object/EMail/IEmail.php +++ b/src/Object/EMail/IEmail.php @@ -56,11 +56,11 @@ interface IEmail /** * Gets the message body of this email (either html or plaintext) * - * @param boolean $text True, if returned as plaintext + * @param boolean $plain True, if returned as plaintext * * @return string */ - function getMessage(bool $text = false); + function getMessage(bool $plain = false); /** * Gets any additional mail header diff --git a/src/Util/Emailer.php b/src/Util/Emailer.php index 9490b5c31a..f2f1edeccb 100644 --- a/src/Util/Emailer.php +++ b/src/Util/Emailer.php @@ -77,8 +77,8 @@ class Emailer "Content-Type: multipart/alternative; boundary=\"{$mimeBoundary}\""; // assemble the final multipart message body with the text and html types included - $textBody = chunk_split(base64_encode($email->getMessage())); - $htmlBody = chunk_split(base64_encode($email->getMessage(true))); + $textBody = chunk_split(base64_encode($email->getMessage(true))); + $htmlBody = chunk_split(base64_encode($email->getMessage())); $multipartMessageBody = "--" . $mimeBoundary . "\n" . // plain text section "Content-Type: text/plain; charset=UTF-8\n" . "Content-Transfer-Encoding: base64\n\n" .