Permalink
Browse files

Allow char(0)

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1168 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
jakubvrana
jakubvrana committed Oct 6, 2009
1 parent fb141cc commit 5c862bac67f659b3fd053c5ee950a37785d7b191
Showing with 1 addition and 1 deletion.
  1. +1 −1 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"]) : "")
;

0 comments on commit 5c862ba

Please sign in to comment.