Skip to content

Commit

Permalink
PostgreSQL: Fix undefined properties on PHP 8
Browse files Browse the repository at this point in the history
Thanks to FrancoisCapon (vrana#429)
  • Loading branch information
peterpp committed Sep 8, 2024
1 parent 374b8ed commit b542b66
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions adminer/include/editing.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ function select($result, $connection2 = null, $orgtables = array(), $limit = 0)
echo "<table cellspacing='0' class='nowrap'>\n";
echo "<thead><tr>";
for ($j=0; $j < count($row); $j++) {
$field = $result->fetch_field();
$name = $field->name;
$orgtable = $field->orgtable;
$orgname = $field->orgname;
$return[$field->table] = $orgtable;
$field = (array)$result->fetch_field();
$name = $field["name"];
$orgtable = $field["orgtable"];
$orgname = $field["orgname"];
$return[$field["table"]] = $orgtable;
if ($orgtables && $jush == "sql") { // MySQL EXPLAIN
$links[$j] = ($name == "table" ? "table=" : ($name == "possible_keys" ? "indexes=" : null));
} elseif ($orgtable != "") {
Expand All @@ -46,11 +46,11 @@ function select($result, $connection2 = null, $orgtables = array(), $limit = 0)
$links[$j] = $orgtable;
}
}
if ($field->charsetnr == 63) { // 63 - binary
if ($field["charsetnr"] == 63) { // 63 - binary
$blobs[$j] = true;
}
$types[$j] = $field->type;
echo "<th" . ($orgtable != "" || $field->name != $orgname ? " title='" . h(($orgtable != "" ? "$orgtable." : "") . $orgname) . "'" : "") . ">" . h($name)
$types[$j] = $field["type"];
echo "<th" . ($orgtable != "" || $field["name"] != $orgname ? " title='" . h(($orgtable != "" ? "$orgtable." : "") . $orgname) . "'" : "") . ">" . h($name)
. ($orgtables ? doc_link(array(
'sql' => "explain-output.html#explain_" . strtolower($name),
'mariadb' => "explain/#the-columns-in-explain-select",
Expand Down

0 comments on commit b542b66

Please sign in to comment.