mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
PHPMailer: Remove use of each() function removed in PHP 8.0
Summary: `each()` has been deprecated since PHP 7.2 and got removed in PHP 8.0 per https://www.php.net/manual/en/function.each.php Replace it with a `foreach` construction. Closes T15833 Test Plan: Carefully read the code; locally testing that construction per D25659#18155; compare to similar rP9623e667458821f696eb92e9dac5a2c9720af7af Reviewers: O1 Blessed Committers, valerio.bozzolan Reviewed By: O1 Blessed Committers, valerio.bozzolan Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Maniphest Tasks: T15833 Differential Revision: https://we.phorge.it/D25659
This commit is contained in:
parent
601ac45032
commit
a579a974eb
2 changed files with 4 additions and 4 deletions
4
externals/phpmailer/class.phpmailer-lite.php
vendored
4
externals/phpmailer/class.phpmailer-lite.php
vendored
|
@ -1487,7 +1487,7 @@ class PHPMailerLite {
|
||||||
$eol = "\r\n";
|
$eol = "\r\n";
|
||||||
$escape = '=';
|
$escape = '=';
|
||||||
$output = '';
|
$output = '';
|
||||||
while( list(, $line) = each($lines) ) {
|
foreach ($lines as $line) {
|
||||||
$linlen = strlen($line);
|
$linlen = strlen($line);
|
||||||
$newline = '';
|
$newline = '';
|
||||||
for($i = 0; $i < $linlen; $i++) {
|
for($i = 0; $i < $linlen; $i++) {
|
||||||
|
@ -1518,7 +1518,7 @@ class PHPMailerLite {
|
||||||
$newline .= $c;
|
$newline .= $c;
|
||||||
} // end of for
|
} // end of for
|
||||||
$output .= $newline.$eol;
|
$output .= $newline.$eol;
|
||||||
} // end of while
|
} // end of foreach
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
4
externals/phpmailer/class.phpmailer.php
vendored
4
externals/phpmailer/class.phpmailer.php
vendored
|
@ -1619,7 +1619,7 @@ class PHPMailer {
|
||||||
$eol = "\r\n";
|
$eol = "\r\n";
|
||||||
$escape = '=';
|
$escape = '=';
|
||||||
$output = '';
|
$output = '';
|
||||||
while( list(, $line) = each($lines) ) {
|
foreach ($lines as $line) {
|
||||||
$linlen = strlen($line);
|
$linlen = strlen($line);
|
||||||
$newline = '';
|
$newline = '';
|
||||||
for($i = 0; $i < $linlen; $i++) {
|
for($i = 0; $i < $linlen; $i++) {
|
||||||
|
@ -1650,7 +1650,7 @@ class PHPMailer {
|
||||||
$newline .= $c;
|
$newline .= $c;
|
||||||
} // end of for
|
} // end of for
|
||||||
$output .= $newline.$eol;
|
$output .= $newline.$eol;
|
||||||
} // end of while
|
} // end of foreach
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue