From 5c862bac67f659b3fd053c5ee950a37785d7b191 Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Tue, 6 Oct 2009 10:00:23 +0000 Subject: [PATCH] Allow char(0) git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1168 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- adminer/include/editing.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adminer/include/editing.inc.php b/adminer/include/editing.inc.php index ffc4d3b8d..79509487f 100644 --- a/adminer/include/editing.inc.php +++ b/adminer/include/editing.inc.php @@ -114,7 +114,7 @@ function process_length($length) { function process_type($field, $collate = "COLLATE") { global $connection, $enum_length, $unsigned; return " $field[type]" - . ($field["length"] && !ereg('^date|time$', $field["type"]) ? "(" . process_length($field["length"]) . ")" : "") + . (strlen($field["length"]) && !ereg('^date|time$', $field["type"]) ? "(" . process_length($field["length"]) . ")" : "") . (ereg('int|float|double|decimal', $field["type"]) && in_array($field["unsigned"], $unsigned) ? " $field[unsigned]" : "") . (ereg('char|text|enum|set', $field["type"]) && $field["collation"] ? " $collate " . $connection->quote($field["collation"]) : "") ;