Fixed issue with each() use in php8.x

This commit is contained in:
Rooty 2021-09-24 15:05:00 +02:00
parent b1b39348b2
commit 4bef473aaf

View File

@ -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) )