diff --git a/smtp.phpmailer.inc b/smtp.phpmailer.inc index 95420d2..d9e4a7a 100644 --- a/smtp.phpmailer.inc +++ b/smtp.phpmailer.inc @@ -1634,7 +1634,7 @@ class PHPMailer { $eol = "\r\n"; $escape = '='; $output = ''; - while ( list(, $line) = each($lines) ) { + foreach ($lines as $line) { $linlen = strlen($line); $newline = ''; for ($i = 0; $i < $linlen; $i++) { @@ -1667,7 +1667,7 @@ class PHPMailer { $newline .= $c; } // end of for $output .= $newline . $eol; - } // end of while + } // end of foreach return $output; } diff --git a/smtp.transport.inc b/smtp.transport.inc index dfecfb0..18e2f62 100644 --- a/smtp.transport.inc +++ b/smtp.transport.inc @@ -390,7 +390,7 @@ class SMTP { $max_line_length = 998; // used below; set here for ease in change - while (list(, $line) = @each($lines)) { + foreach ($lines as $line) { $lines_out = NULL; if ($line == "" && $in_headers) { $in_headers = FALSE; @@ -420,7 +420,7 @@ class SMTP { $lines_out[] = $line; // 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 (substr($line_out, 0, 1) == ".") { $line_out = "." . $line_out;