From 4bef473aafa52ec6f67f2b22f0602920dcbc0988 Mon Sep 17 00:00:00 2001 From: "tristan.champomier" Date: Fri, 24 Sep 2021 15:05:00 +0200 Subject: [PATCH] Fixed issue with each() use in php8.x --- config/config.system.php.install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/config.system.php.install b/config/config.system.php.install index 63fccb1..a7f6a46 100755 --- a/config/config.system.php.install +++ b/config/config.system.php.install @@ -85,7 +85,8 @@ if( getenv('HTTP_X_FORWARDED_FOR') != '' ) $entries = explode(',', getenv('HTTP_X_FORWARDED_FOR')); reset($entries); - while (list(, $entry) = each($entries)) +// while (list(, $entry) = each($entries)) + foreach($entries[1] as $entry) { $entry = trim($entry); if ( preg_match("/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/", $entry, $ip_list) )