summaryrefslogtreecommitdiffstats
path: root/web/html/voters.php
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2018-05-12 13:35:11 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2018-05-12 13:35:11 +0200
commit4b8b2e3eb139518ea1abd5875135bb39a9f0c187 (patch)
treea522f7fc813dcb628be43518776ae96439f070e6 /web/html/voters.php
parent8838490665c1bc7f682a4853be18c2b758328fb0 (diff)
downloadaur-4b8b2e3eb139518ea1abd5875135bb39a9f0c187.tar.gz
aur-4b8b2e3eb139518ea1abd5875135bb39a9f0c187.tar.xz
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>
Diffstat (limited to 'web/html/voters.php')
-rw-r--r--web/html/voters.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/html/voters.php b/web/html/voters.php
index 997186d8..bacbcfc8 100644
--- a/web/html/voters.php
+++ b/web/html/voters.php
@@ -16,14 +16,14 @@ if (has_credential(CRED_PKGBASE_LIST_VOTERS)):
<h2>Votes for <a href="<?= get_pkgbase_uri($pkgbase_name); ?>"><?= $pkgbase_name ?></a></h2>
<div class="boxbody">
<ul>
- <?php while (list($indx, $row) = each($votes)): ?>
+ <?php foreach ($votes as $indx => $row): ?>
<li>
<a href="<?= get_user_uri($row['Username']); ?>"><?= htmlspecialchars($row['Username']) ?></a>
<?php if ($row["VoteTS"] > 0): ?>
(<?= date("Y-m-d H:i", intval($row["VoteTS"])) ?>)
<?php endif; ?>
</li>
- <?php endwhile; ?>
+ <?php endforeach; ?>
</ul>
</div>
</div>