1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-31 01:59:59 +02:00

PostgreSQL: Fix undefined properties on PHP 8

Thanks to FrancoisCapon (https://github.com/vrana/adminer/pull/429)
This commit is contained in:
Peter Knut
2024-09-08 23:22:44 +02:00
parent 374b8ed6a6
commit b542b6613c

View File

@@ -21,11 +21,11 @@ function select($result, $connection2 = null, $orgtables = array(), $limit = 0)
echo "<table cellspacing='0' class='nowrap'>\n"; echo "<table cellspacing='0' class='nowrap'>\n";
echo "<thead><tr>"; echo "<thead><tr>";
for ($j=0; $j < count($row); $j++) { for ($j=0; $j < count($row); $j++) {
$field = $result->fetch_field(); $field = (array)$result->fetch_field();
$name = $field->name; $name = $field["name"];
$orgtable = $field->orgtable; $orgtable = $field["orgtable"];
$orgname = $field->orgname; $orgname = $field["orgname"];
$return[$field->table] = $orgtable; $return[$field["table"]] = $orgtable;
if ($orgtables && $jush == "sql") { // MySQL EXPLAIN if ($orgtables && $jush == "sql") { // MySQL EXPLAIN
$links[$j] = ($name == "table" ? "table=" : ($name == "possible_keys" ? "indexes=" : null)); $links[$j] = ($name == "table" ? "table=" : ($name == "possible_keys" ? "indexes=" : null));
} elseif ($orgtable != "") { } elseif ($orgtable != "") {
@@ -46,11 +46,11 @@ function select($result, $connection2 = null, $orgtables = array(), $limit = 0)
$links[$j] = $orgtable; $links[$j] = $orgtable;
} }
} }
if ($field->charsetnr == 63) { // 63 - binary if ($field["charsetnr"] == 63) { // 63 - binary
$blobs[$j] = true; $blobs[$j] = true;
} }
$types[$j] = $field->type; $types[$j] = $field["type"];
echo "<th" . ($orgtable != "" || $field->name != $orgname ? " title='" . h(($orgtable != "" ? "$orgtable." : "") . $orgname) . "'" : "") . ">" . h($name) echo "<th" . ($orgtable != "" || $field["name"] != $orgname ? " title='" . h(($orgtable != "" ? "$orgtable." : "") . $orgname) . "'" : "") . ">" . h($name)
. ($orgtables ? doc_link(array( . ($orgtables ? doc_link(array(
'sql' => "explain-output.html#explain_" . strtolower($name), 'sql' => "explain-output.html#explain_" . strtolower($name),
'mariadb' => "explain/#the-columns-in-explain-select", 'mariadb' => "explain/#the-columns-in-explain-select",