From d9e543ba970bf2c5fdeb400140ea3d31711cd575 Mon Sep 17 00:00:00 2001 From: Andre Klapper Date: Thu, 30 May 2024 15:38:57 +0200 Subject: [PATCH] PHPMailer: Set defaults for required parameters followed by optional parameters in Authorise() method signature Summary: Required parameters $password and $username follow the optional parameter $tval. This is deprecated since PHP 8.0 per https://www.php.net/manual/en/migration80.deprecated.php Define defaults for those required parameters to fix the issue - https://github.com/PHPMailer/PHPMailer/blob/master/src/POP3.php#L199 seems to also have survived so far without complaints by PHP 8 users (and PHPStan also does not complain anymore after this change). Closes T15834 Test Plan: Carefully read the code. Reviewers: O1 Blessed Committers, valerio.bozzolan Reviewed By: O1 Blessed Committers, valerio.bozzolan Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Maniphest Tasks: T15834 Differential Revision: https://we.phorge.it/D25660 --- externals/phpmailer/class.pop3.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/externals/phpmailer/class.pop3.php b/externals/phpmailer/class.pop3.php index c48191bd72..b4a261cfcc 100644 --- a/externals/phpmailer/class.pop3.php +++ b/externals/phpmailer/class.pop3.php @@ -142,7 +142,7 @@ class POP3 { * @param string $username * @param string $password */ - public function Authorise ($host, $port = false, $tval = false, $username, $password, $debug_level = 0) { + public function Authorise ($host, $port = false, $tval = false, $username = '', $password = '', $debug_level = 0) { $this->host = $host; // If no port value is passed, retrieve it