bug #1207406, undefined index from PMA_setComment

This commit is contained in:
Marc Delisle
2005-05-26 16:56:14 +00:00
parent 30cebf0804
commit d790e42101
2 changed files with 7 additions and 1 deletions

View File

@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$
$Source$
2005-05-26 Marc Delisle <lem9@users.sourceforge.net>
* tbl_create.php: bug #1207406, undefined index from PMA_setComment()
2005-05-25 Marc Delisle <lem9@users.sourceforge.net>
* tbl_properties.inc.php: bug #1207404, undefined variables

View File

@@ -200,7 +200,10 @@ if (isset($submit_num_fields)) {
// garvin: Update comment table, if a comment was set.
if (isset($field_comments) && is_array($field_comments) && ($cfgRelation['commwork'] || PMA_MYSQL_INT_VERSION >= 40100)) {
foreach ($field_comments AS $fieldindex => $fieldcomment) {
PMA_setComment($db, $table, $field_name[$fieldindex], $fieldcomment);
// do not try to set a comment if the field name is empty
if (!empty($field_name[$fieldindex])) {
PMA_setComment($db, $table, $field_name[$fieldindex], $fieldcomment);
}
}
}