1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-07 23:27:17 +02:00

Fix type when missing $field

This happens e.g. for INNODB_BUFFER_PAGE.IS_STALE which is undeclared but returned.
This commit is contained in:
Jakub Vrana
2025-03-31 17:07:27 +02:00
parent 10bc856ebe
commit eb6b23e014

View File

@@ -396,7 +396,7 @@ if (!$columns && support("table")) {
}
$unique_idf = "";
foreach ($unique_array as $key => $val) {
$field = $fields[$key];
$field = (array) $fields[$key];
if ((JUSH == "sql" || JUSH == "pgsql") && preg_match('~char|text|enum|set~', $field["type"]) && strlen($val) > 64) {
$key = (strpos($key, '(') ? $key : idf_escape($key)); //! columns looking like functions
$key = "MD5(" . (JUSH != 'sql' || preg_match("~^utf8~", $field["collation"]) ? $key : "CONVERT($key USING " . charset(connection()) . ")") . ")";
@@ -411,7 +411,7 @@ if (!$columns && support("table")) {
foreach ($row as $key => $val) {
if (isset($names[$key])) {
$field = $fields[$key];
$field = (array) $fields[$key];
$val = driver()->value($val, $field);
if ($val != "" && (!isset($email_fields[$key]) || $email_fields[$key] != "")) {
$email_fields[$key] = (is_mail($val) ? $names[$key] : ""); //! filled e-mails can be contained on other pages