Unknown: The each() function is deprecated...
Posted: Wed Jan 06, 2021 2:08 am
I get this message on a theme that I am using with my opencart 2.3.0.2:
Unknown: The each() function is deprecated. This message will be suppressed on further calls in /..../Number.php on line 293
This is what is writen on that line in that php file:
reset($units);
list($unit, ) = each($units);
return (string) $dimension . $unit;
}
I already understand it has to do with the PHP version, which is set at 7.2 (can't set it to older versions) and the part of 'each' should be rewriten to 'foreach', but I can't figure out how to do that correctly in this situation...
Can anybody help?
Unknown: The each() function is deprecated. This message will be suppressed on further calls in /..../Number.php on line 293
This is what is writen on that line in that php file:
reset($units);
list($unit, ) = each($units);
return (string) $dimension . $unit;
}
I already understand it has to do with the PHP version, which is set at 7.2 (can't set it to older versions) and the part of 'each' should be rewriten to 'foreach', but I can't figure out how to do that correctly in this situation...
Can anybody help?