From 967d5c64a3ab3e7370315667b1e05bc41d48a646 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Tue, 6 Feb 2018 12:49:39 +0100 Subject: [PATCH] Avoid deprecated each() --- adminer/include/adminer.inc.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/adminer/include/adminer.inc.php b/adminer/include/adminer.inc.php index 645281bf..29aac50f 100644 --- a/adminer/include/adminer.inc.php +++ b/adminer/include/adminer.inc.php @@ -366,11 +366,9 @@ class Adminer { echo "\n"; } } - $_GET["where"] = (array) $_GET["where"]; - reset($_GET["where"]); + $_GET["where"][] = array(); $change_next = "this.parentNode.firstChild.onchange();"; - for ($i = 0; $i <= count($_GET["where"]); $i++) { - list(, $val) = each($_GET["where"]); + foreach ($_GET["where"] as $i => $val) { if (!$val || ("$val[col]$val[val]" != "" && in_array($val["op"], $this->operators))) { echo "
" . select_input( " name='where[$i][col]'",