]> git.joonet.de Git - adminer.git/commitdiff
Do not modify $_GET["where"]
authorJakub Vrana <jakub@vrana.cz>
Tue, 6 Feb 2018 11:58:06 +0000 (12:58 +0100)
committerJakub Vrana <jakub@vrana.cz>
Tue, 6 Feb 2018 12:00:17 +0000 (13:00 +0100)
adminer/include/adminer.inc.php

index 00ca8c0f2575d3d23325258c33e8f5cec0c9c28b..413ca3bad57d317b74694cef1f849cecadba9de1 100644 (file)
@@ -366,9 +366,8 @@ class Adminer {
                                echo "</div>\n";
                        }
                }
-               $_GET["where"][] = array();
                $change_next = "this.parentNode.firstChild.onchange();";
-               foreach ($_GET["where"] as $i => $val) {
+               foreach (array_merge((array) $_GET["where"], array(array())) as $i => $val) {
                        if (!$val || ("$val[col]$val[val]" != "" && in_array($val["op"], $this->operators))) {
                                echo "<div>" . select_input(
                                        " name='where[$i][col]'",