Don't store empty parameters
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@334 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
7ce79142c0
commit
06bd9700be
|
@ -14,8 +14,10 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["drop_col"]) {
|
|||
$fields = array_filter((array) $_POST["fields"], 'strlen');
|
||||
ksort($fields);
|
||||
foreach ($fields as $field) {
|
||||
if (strlen($field["field"])) {
|
||||
$set[] = (in_array($field["inout"], $inout) ? "$field[inout] " : "") . idf_escape($field["field"]) . process_type($field, "CHARACTER SET");
|
||||
}
|
||||
}
|
||||
if ($mysql->query(
|
||||
"CREATE $routine " . idf_escape($_POST["name"])
|
||||
. " (" . implode(", ", $set) . ")"
|
||||
|
|
Loading…
Reference in a new issue