]> git.joonet.de Git - adminer.git/commitdiff
Avoid deprecated each()
authorJakub Vrana <jakub@vrana.cz>
Tue, 6 Feb 2018 11:49:39 +0000 (12:49 +0100)
committerJakub Vrana <jakub@vrana.cz>
Tue, 6 Feb 2018 11:49:39 +0000 (12:49 +0100)
adminer/include/adminer.inc.php

index 645281bfea0627746ccb3b9cb48cdca8055d0ce0..29aac50f2c188c2a8a8bf25cd7082773dc5bbb65 100644 (file)
@@ -366,11 +366,9 @@ class Adminer {
                                echo "</div>\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 "<div>" . select_input(
                                        " name='where[$i][col]'",