diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php index f4ab0c3e..9bb5ce18 100644 --- a/adminer/include/functions.inc.php +++ b/adminer/include/functions.inc.php @@ -345,9 +345,12 @@ function redirect($location, $message = null) { restart_session(); $_SESSION["messages"][] = $message; } - if (isset($location) && $_SERVER["HTTP_X_REQUESTED_WITH"] != "XMLHttpRequest") { - header("Location: " . ($location != "" ? $location : ".")); - exit; + if (isset($location)) { + if ($_SERVER["HTTP_X_REQUESTED_WITH"] != "XMLHttpRequest") { + header("Location: " . ($location != "" ? $location : ".")); + exit; + } + $_POST = array(); } } diff --git a/adminer/select.inc.php b/adminer/select.inc.php index 2bcac10d..73430d08 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -333,7 +333,7 @@ if (!$columns) { } } $id = h("val[$unique_idf][" . bracket_escape($key) . "]"); - $value = ($error ? $_POST["val"][$unique_idf][bracket_escape($key)] : null); + $value = $_POST["val"][$unique_idf][bracket_escape($key)]; $h_value = h(isset($value) ? $value : $row[$key]); $long = strpos($val, "..."); $editable = is_utf8($val) && !$long && $rows[$n][$key] == $row[$key] && !$functions[$key];