1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 16:22:43 +01:00

replace usage of each() with foreach() for smtp

Summary:
this replaces uses with warning suppression of each() (depreccated in
PHP7, removed in PHP8) with foreach

Test Plan: can verify that these chages do work (tested on my own install)

Reviewers: O1 Blessed Committers, #blessed_committers, dsadad, avivey, valerio.bozzolan

Reviewed By: O1 Blessed Committers, #blessed_committers, dsadad, avivey, valerio.bozzolan

Subscribers: avivey, Cigaryno, speck, tobiaswiese, valerio.bozzolan, Matthew

Differential Revision: https://we.phorge.it/D25059
This commit is contained in:
MacFan4000 2023-03-03 19:27:30 +01:00 committed by Valerio Bozzolan
parent 66192a5b83
commit 9623e66745

View file

@ -385,7 +385,7 @@ class SMTP {
$max_line_length = 998; // used below; set here for ease in change $max_line_length = 998; // used below; set here for ease in change
while(list(,$line) = @each($lines)) { foreach($lines as $line) {
$lines_out = null; $lines_out = null;
if($line == "" && $in_headers) { if($line == "" && $in_headers) {
$in_headers = false; $in_headers = false;
@ -414,7 +414,7 @@ class SMTP {
$lines_out[] = $line; $lines_out[] = $line;
// send the lines to the server // send the lines to the server
while(list(,$line_out) = @each($lines_out)) { foreach($lines_out as $line_out) {
if(strlen($line_out) > 0) if(strlen($line_out) > 0)
{ {
if(substr($line_out, 0, 1) == ".") { if(substr($line_out, 0, 1) == ".") {