Page MenuHomePhorge

PHPMailer: Remove use of each() function removed in PHP 8.0
ClosedPublic

Authored by aklapper on May 17 2024, 13:56.

Details

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

Diff Detail

Repository
rP Phorge
Branch
T15833eachMailer (branched from master)
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 1282
Build 1282: arc lint + arc unit

Event Timeline

Hmm, I also found this mentioned in https://secure.phabricator.com/T12404#256288 proposing a slightly different approach.

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)

This revision is now accepted and ready to land.May 18 2024, 13:17