mirror of
https://github.com/php/web-php.git
synced 2026-03-23 23:02:13 +01:00
Refactor each() function to foreach()
The each() function has been deprecated since PHP 7.2 and shouldn't be used anymore: - http://php.net/manual/en/function.each.php
This commit is contained in:
@@ -23,8 +23,7 @@ if (is_official_mirror()) {
|
||||
|
||||
// Iterate through possible mirror provider logo types in priority order
|
||||
$types = array("gif", "jpg", "png");
|
||||
while (list(,$ext) = each($types)) {
|
||||
|
||||
foreach ($types as $ext) {
|
||||
// Check if file exists for this type
|
||||
if (file_exists("backend/mirror." . $ext)) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user