"
@@ -83,7 +83,7 @@ foreach ($schema as $name => $table) {
foreach ((array) $referenced[$name] as $target_name => $refs) {
foreach ($refs as $left => $columns) {
- $left1 = $left - $table_pos[$name][1];
+ $left1 = $left - idx($table_pos[$name], 1);
$i = 0;
foreach ($columns as $target) {
echo "\n
"
diff --git a/adminer/select.inc.php b/adminer/select.inc.php
index 8ae4ca58..1cbb0683 100644
--- a/adminer/select.inc.php
+++ b/adminer/select.inc.php
@@ -339,7 +339,7 @@ if (!$columns && support("table")) {
$rank = 1;
foreach ($rows[0] as $key => $val) {
if (!isset($unselected[$key])) {
- $val = $_GET["columns"][key($select)];
+ $val = idx($_GET["columns"], key($select)) ?: array();
$field = $fields[$select ? ($val ? $val["col"] : current($select)) : $key];
$name = ($field ? $adminer->fieldName($field, $rank) : ($val["fun"] ? "*" : h($key)));
if ($name != "") {
@@ -450,7 +450,7 @@ if (!$columns && support("table")) {
$val = select_value($val, $link, $field, $text_length);
$id = h("val[$unique_idf][" . bracket_escape($key) . "]");
- $value = $_POST["val"][$unique_idf][bracket_escape($key)];
+ $value = idx(idx($_POST["val"], $unique_idf), bracket_escape($key));
$editable = !is_array($row[$key]) && is_utf8($val) && $rows[$n][$key] == $row[$key] && !$functions[$key] && !$field["generated"];
$text = preg_match('~text|json|lob~', $field["type"]);
echo "
" . h($desc) . input_hidden("where[$i][col]", $name) . input_hidden("where[$i][op]", "=") . ": \n";
+ echo " " . h($desc) . input_hidden("where[$i][col]", $name) . input_hidden("where[$i][op]", "=") . ": \n";
unset($columns[$name]);
}
}
@@ -294,7 +294,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row
}
if ($orders) {
echo '\n";
}
if ($_GET["order"]) {
diff --git a/plugins/drivers/elastic.php b/plugins/drivers/elastic.php
index 4b9f1cc1..2369d0e8 100644
--- a/plugins/drivers/elastic.php
+++ b/plugins/drivers/elastic.php
@@ -274,7 +274,7 @@ if (isset($_GET["elastic"])) {
function delete($table, $queryWhere, $limit = 0) {
//! use $limit
$ids = array();
- if (isset($_GET["where"]["_id"]) && $_GET["where"]["_id"]) {
+ if (idx($_GET["where"], "_id")) {
$ids[] = $_GET["where"]["_id"];
}
if (isset($_POST['check'])) {
|