|
while (list($i, $path) = each($paths)) |
Changing this line from each() to foreach()
Old line
while (list($i, $path) = each($paths))
New line
foreach ($paths as $i=>$path)
This method is also a lot faster. See
https://www.php.net/manual/en/function.each.php