From 645c05cfbfd4962ea663c8540aa8444dffceb847 Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 4 Dec 2020 17:21:03 -0800 Subject: [PATCH] PHP8 Compatibility Fixes --- e107_handlers/db_debug_class.php | 3 ++- e107_handlers/e_parse_class.php | 2 +- e107_handlers/pop3_class.php | 2 +- e107_handlers/pop_bounce_handler.php | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/e107_handlers/db_debug_class.php b/e107_handlers/db_debug_class.php index 4c495d74e..568b24f70 100644 --- a/e107_handlers/db_debug_class.php +++ b/e107_handlers/db_debug_class.php @@ -501,8 +501,9 @@ } - while(list($tKey, $tMarker) = each($this->aTimeMarks)) + foreach($this->aTimeMarks as $tKey => $tMarker) { + if(!$bRowHeaders) { // First time: emit headers diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php index 75a5cc3fa..a26fa7d35 100644 --- a/e107_handlers/e_parse_class.php +++ b/e107_handlers/e_parse_class.php @@ -1036,7 +1036,7 @@ class e_parse extends e_parser if (in_array(substr($lvalue, 1), $nobreak)) { reset($innbk); - while (list($key, $tag) = each($innbk)) + foreach($innbk as $key=>$tag) { if (substr($lvalue, 1) == $tag) { diff --git a/e107_handlers/pop3_class.php b/e107_handlers/pop3_class.php index 77cedcddc..5dfc0efd0 100644 --- a/e107_handlers/pop3_class.php +++ b/e107_handlers/pop3_class.php @@ -111,7 +111,7 @@ class receiveMail } if($structure->type == 1) /* multipart */ { - while(list($index, $sub_structure) = each($structure->parts)) + foreach($structure->parts as $index => $sub_structure) { if($part_number) { diff --git a/e107_handlers/pop_bounce_handler.php b/e107_handlers/pop_bounce_handler.php index d913c48ab..ea440a48d 100644 --- a/e107_handlers/pop_bounce_handler.php +++ b/e107_handlers/pop_bounce_handler.php @@ -159,7 +159,7 @@ class pop3BounceHandler } if($structure->type == 1) /* multipart */ { - while(list($index, $sub_structure) = each($structure->parts)) + foreach($structure->parts as $index => $sub_structure) { if($part_number) {