diff --git a/adminer/select.inc.php b/adminer/select.inc.php index 81e07af1..0b7b957a 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -396,9 +396,10 @@ if (!$columns && support("table")) { } $unique_idf = ""; foreach ($unique_array as $key => $val) { - if ((JUSH == "sql" || JUSH == "pgsql") && preg_match('~char|text|enum|set~', $fields[$key]["type"]) && strlen($val) > 64) { + $field = $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~", $fields[$key]["collation"]) ? $key : "CONVERT($key USING " . charset(connection()) . ")") . ")"; + $key = "MD5(" . (JUSH != 'sql' || preg_match("~^utf8~", $field["collation"]) ? $key : "CONVERT($key USING " . charset(connection()) . ")") . ")"; $val = md5($val); } $unique_idf .= "&" . ($val !== null ? urlencode("where[" . bracket_escape($key) . "]") . "=" . urlencode($val === false ? "f" : $val) : "null%5B%5D=" . urlencode($key));