mirror of
https://github.com/vrana/adminer.git
synced 2025-08-13 10:04:07 +02:00
Fix edit by long non-utf8 string (thanks Robert Vlach)
This commit is contained in:
@@ -443,8 +443,7 @@ username.form['auth[driver]'].onchange();
|
||||
&& (!preg_match("~[\x80-\xFF]~", $val["val"]) || $is_text)
|
||||
) {
|
||||
$name = idf_escape($name);
|
||||
$charset = charset($connection);
|
||||
$cols[] = ($jush == "sql" && $is_text && !preg_match("~^$charset" . "_~", $field["collation"]) ? "CONVERT($name USING $charset)" : $name);
|
||||
$cols[] = ($jush == "sql" && $is_text && !preg_match("~^utf8_~", $field["collation"]) ? "CONVERT($name USING " . charset($connection) . ")" : $name);
|
||||
}
|
||||
}
|
||||
$return[] = ($cols ? "(" . implode("$cond OR ", $cols) . "$cond)" : "0");
|
||||
|
Reference in New Issue
Block a user