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
Differential D25659
PHPMailer: Remove use of each() function removed in PHP 8.0 aklapper on May 17 2024, 13:56. Authored by
Details
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 Carefully read the code; locally testing that construction per D25659#18155; compare to similar rP9623e667458821f696eb92e9dac5a2c9720af7af
Diff Detail
Event TimelineComment Actions Hmm, I also found this mentioned in https://secure.phabricator.com/T12404#256288 proposing a slightly different approach. Comment Actions Thanks :3 It makes sense, and I've also tested that snippet in PHP 5.5 and PHP 8.1 obtaining same results (premising that each() is not available anymore in PHP 8 as already clarified) |