Update Kirby and Composer dependencies

This commit is contained in:
Paul Nicoué 2022-03-22 15:39:39 +01:00
parent f5d3ea5e84
commit ec74d78ba9
382 changed files with 25077 additions and 4955 deletions

View file

@ -12,7 +12,7 @@ use Kirby\Toolkit\Properties;
* @author Bastian Allgeier <bastian@getkirby.com>,
* Nico Hoffmann <nico@getkirby.com>
* @link https://getkirby.com
* @copyright Bastian Allgeier GmbH
* @copyright Bastian Allgeier
* @license https://opensource.org/licenses/MIT
*/
class Body
@ -20,12 +20,12 @@ class Body
use Properties;
/**
* @var string|null
* @var string
*/
protected $html;
/**
* @var string|null
* @var string
*/
protected $text;
@ -42,21 +42,21 @@ class Body
/**
* Returns the HTML content of the email body
*
* @return string|null
* @return string
*/
public function html()
{
return $this->html;
return $this->html ?? '';
}
/**
* Returns the plain text content of the email body
*
* @return string|null
* @return string
*/
public function text()
{
return $this->text;
return $this->text ?? '';
}
/**

View file

@ -14,7 +14,7 @@ use Kirby\Toolkit\V;
* @author Bastian Allgeier <bastian@getkirby.com>,
* Nico Hoffmann <nico@getkirby.com>
* @link https://getkirby.com
* @copyright Bastian Allgeier GmbH
* @copyright Bastian Allgeier
* @license https://opensource.org/licenses/MIT
*/
class Email
@ -211,7 +211,7 @@ class Email
*/
public function isHtml()
{
return $this->body()->html() !== null;
return empty($this->body()->html()) === false;
}
/**

View file

@ -12,7 +12,7 @@ use PHPMailer\PHPMailer\PHPMailer as Mailer;
* @author Bastian Allgeier <bastian@getkirby.com>,
* Nico Hoffmann <nico@getkirby.com>
* @link https://getkirby.com
* @copyright Bastian Allgeier GmbH
* @copyright Bastian Allgeier
* @license https://opensource.org/licenses/MIT
*/
class PHPMailer extends Email