From 6c74e4b33f815928dac7b230148bc0a4d1a136d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20D=C4=85bek?= Date: Tue, 2 Jul 2019 20:51:00 +0200 Subject: [PATCH] Strict check XMailer with empty string (#1764) --- src/PHPMailer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PHPMailer.php b/src/PHPMailer.php index 8a50d06b4..5411e4ff8 100644 --- a/src/PHPMailer.php +++ b/src/PHPMailer.php @@ -527,9 +527,9 @@ class PHPMailer /** * What to put in the X-Mailer header. - * Options: An empty string for PHPMailer default, whitespace for none, or a string to use. + * Options: An empty string for PHPMailer default, whitespace/null for none, or a string to use. * - * @var string + * @var string|null */ public $XMailer = ''; @@ -2380,7 +2380,7 @@ public function createHeader() if (null !== $this->Priority) { $result .= $this->headerLine('X-Priority', $this->Priority); } - if ('' == $this->XMailer) { + if ('' === $this->XMailer) { $result .= $this->headerLine( 'X-Mailer', 'PHPMailer ' . self::VERSION . ' (https://github.com/PHPMailer/PHPMailer)'