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

Fix handling of POINT data type (bug #3582578)

This commit is contained in:
Jakub Vrana
2013-04-26 11:42:18 -07:00
parent 0f47ae8e0f
commit 741cd5b4b6
4 changed files with 6 additions and 5 deletions

View File

@@ -414,7 +414,7 @@ username.form['auth[driver]'].onchange();
$cols = array();
foreach ($fields as $name => $field) {
$is_text = ereg('char|text|enum|set', $field["type"]);
if ((is_numeric($val["val"]) || !ereg('int|float|double|decimal|bit', $field["type"]))
if ((is_numeric($val["val"]) || !ereg('(^|[^o])int|float|double|decimal|bit', $field["type"]))
&& (!ereg("[\x80-\xFF]", $val["val"]) || $is_text)
) {
$name = idf_escape($name);
@@ -661,7 +661,7 @@ username.form['auth[driver]'].onchange();
}
foreach ($row as $key => $val) {
$row[$key] = ($val !== null
? (ereg('int|float|double|decimal|bit', $fields[$keys[$key]]["type"]) && $val != '' ? $val : q($val)) //! columns looking like functions
? (ereg('(^|[^o])int|float|double|decimal|bit', $fields[$keys[$key]]["type"]) && $val != '' ? $val : q($val)) //! columns looking like functions
: "NULL"
);
}