@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+4 -4
+2 -2
externals/phpmailer/class.phpmailer-lite.php
··· 1487 1487 $eol = "\r\n"; 1488 1488 $escape = '='; 1489 1489 $output = ''; 1490 - while( list(, $line) = each($lines) ) { 1490 + foreach ($lines as $line) { 1491 1491 $linlen = strlen($line); 1492 1492 $newline = ''; 1493 1493 for($i = 0; $i < $linlen; $i++) { ··· 1518 1518 $newline .= $c; 1519 1519 } // end of for 1520 1520 $output .= $newline.$eol; 1521 - } // end of while 1521 + } // end of foreach 1522 1522 return $output; 1523 1523 } 1524 1524
+2 -2
externals/phpmailer/class.phpmailer.php
··· 1619 1619 $eol = "\r\n"; 1620 1620 $escape = '='; 1621 1621 $output = ''; 1622 - while( list(, $line) = each($lines) ) { 1622 + foreach ($lines as $line) { 1623 1623 $linlen = strlen($line); 1624 1624 $newline = ''; 1625 1625 for($i = 0; $i < $linlen; $i++) { ··· 1650 1650 $newline .= $c; 1651 1651 } // end of for 1652 1652 $output .= $newline.$eol; 1653 - } // end of while 1653 + } // end of foreach 1654 1654 return $output; 1655 1655 } 1656 1656