Skip to content

Commit

Permalink
fix each to foreach on php7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
hetao committed Jun 1, 2018
1 parent d1a92dc commit 4a4827c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plugins/mail/class.phpmailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1390,7 +1390,7 @@ public function EncodeQP( $input = '', $line_max = 76, $space_conv = false ) {
$eol = "\r\n";
$escape = '=';
$output = '';
while( list(, $line) = each($lines) ) {
foreach($lines as $line){
$linlen = strlen($line);
$newline = '';
for($i = 0; $i < $linlen; $i++) {
Expand Down
6 changes: 3 additions & 3 deletions plugins/mail/class.smtp.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ public function Data($msg_data) {

$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;
Expand Down Expand Up @@ -418,7 +418,7 @@ public function Data($msg_data) {
$lines_out[] = $line;

// now 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) == ".") {
Expand Down Expand Up @@ -502,7 +502,7 @@ public function Expand($name) {

// parse the reply and place in our array to return to user
$entries = explode($this->CRLF,$rply);
while(list(,$l) = @each($entries)) {
foreach($entries as $l){
$list[] = substr($l,4);
}

Expand Down

0 comments on commit 4a4827c

Please sign in to comment.