summaryrefslogtreecommitdiffstats
path: root/web/template/pkg_details.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/template/pkg_details.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/template/pkg_details.php')
-rw-r--r--web/template/pkg_details.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php
index 8a934173..650c245c 100644
--- a/web/template/pkg_details.php
+++ b/web/template/pkg_details.php
@@ -276,9 +276,9 @@ endif;
<h3><?= __('Dependencies') . " (" . count($deps) . ")"?></h3>
<?php if (count($deps) > 0): ?>
<ul id="pkgdepslist">
-<?php while (list($k, $darr) = each($deps)): ?>
+<?php foreach ($deps as $k => $darr): ?>
<li><?= pkg_depend_link($darr[0], $darr[1], $darr[2], $darr[3], $darr[4], $darr[5]); ?></li>
-<?php endwhile; ?>
+<?php endforeach; ?>
</ul>
<?php endif; ?>
</div>
@@ -286,9 +286,9 @@ endif;
<h3><?= __('Required by') . " (" . count($requiredby) . ")"?></h3>
<?php if (count($requiredby) > 0): ?>
<ul id="pkgreqslist">
- <?php while (list($k, $darr) = each($requiredby)): ?>
+ <?php foreach ($requiredby as $k => $darr): ?>
<li><?= pkg_requiredby_link($darr[0], $darr[1], $darr[2], $darr[3], $row['Name']); ?></li>
- <?php endwhile; ?>
+ <?php endforeach; ?>
</ul>
<?php endif; ?>
</div>
@@ -298,9 +298,9 @@ endif;
<?php if (count($sources) > 0): ?>
<div>
<ul id="pkgsrcslist">
- <?php while (list($k, $src) = each($sources)): ?>
+ <?php foreach ($sources as $k => $src): ?>
<li><?= pkg_source_link($src[0], $src[1], urlencode($row['BaseName'])) ?></li>
- <?php endwhile; ?>
+ <?php endforeach; ?>
</ul>
</div>
<?php endif; ?>