summaryrefslogtreecommitdiffstats
path: root/web/template/account_search_results.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/account_search_results.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/account_search_results.php')
-rw-r--r--web/template/account_search_results.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/web/template/account_search_results.php b/web/template/account_search_results.php
index 43f2d1d6..81cd8185 100644
--- a/web/template/account_search_results.php
+++ b/web/template/account_search_results.php
@@ -18,7 +18,7 @@ else:
</thead>
<?php
$i = 0;
- while (list($indx, $row) = each($userinfo)):
+ foreach ($userinfo as $indx => $row):
if ($i % 2):
$c = "even";
else:
@@ -51,7 +51,7 @@ else:
</tr>
<?php
$i++;
- endwhile;
+ endforeach;
?>
</table>
@@ -64,10 +64,10 @@ else:
<input type="hidden" name="O" value="<?= ($OFFSET-$HITS_PER_PAGE) ?>" />
<?php
reset($search_vars);
- while (list($k, $ind) = each($search_vars)):
+ foreach ($search_vars as $k => $ind):
?>
<input type="hidden" name="<?= $ind ?>" value="<?= ${$ind} ?>" />
- <?php endwhile; ?>
+ <?php endforeach; ?>
<input type="submit" class="button" value="&lt;-- <?= __("Less") ?>" />
</fieldset>
</form>
@@ -79,10 +79,10 @@ else:
<input type="hidden" name="O" value="<?= ($OFFSET+$HITS_PER_PAGE) ?>" />
<?php
reset($search_vars);
- while (list($k, $ind) = each($search_vars)):
+ foreach ($search_vars as $k => $ind):
?>
<input type="hidden" name="<?= $ind ?>" value="<?= ${$ind} ?>" />
- <?php endwhile; ?>
+ <?php endforeach; ?>
<input type="submit" class="button" value="<?= __("More") ?> --&gt;" />
</fieldset>
</form>