Stop using each()

The each() function has been deprecated as of PHP 7.2.0. Use foreach
loops instead.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
Lukas Fleischer 2018-05-12 13:35:11 +02:00
parent 8838490665
commit 4b8b2e3eb1
11 changed files with 29 additions and 29 deletions

View file

@ -126,10 +126,10 @@ endif;
<?php if (count($pkgs) > 0): ?>
<ul>
<?php
while (list($k, $pkg) = each($pkgs)):
foreach ($pkgs as $k => $pkg):
?>
<li><a href="<?= htmlspecialchars(get_pkg_uri($pkg), ENT_QUOTES); ?>" title="<?= __('View packages details for').' '. htmlspecialchars($pkg) ?>"><?= htmlspecialchars($pkg) ?></a></li>
<?php endwhile; ?>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</div>