1
0
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:
Peter Kokot
2018-11-04 02:03:56 +01:00
parent b7231b60cd
commit 190459c766
6 changed files with 14 additions and 8 deletions

View File

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