previous fix introduced a bug: cannot change a value for a nullable field

This commit is contained in:
Marc Delisle
2005-12-22 16:49:33 +00:00
parent 3efc3b718c
commit 84952a539b
2 changed files with 4 additions and 1 deletions

View File

@@ -10,6 +10,8 @@ $Source$
Cannot edit a table having 40 columns
* libraries/common.lib.php: bug #1388116, cannot pass TRUE by reference
to PMA_setCookie, thanks to Isaac Bennetch
* libraries/tbl_replace_fields.inc.php: recent fix introduced a bug:
cannot change a value for a nullable field
2005-12-21 Marc Delisle <lem9@users.sourceforge.net>
* lang/danish: Updated, thanks to AlleyKat - dk_alleykat

View File

@@ -215,7 +215,8 @@ if (!$check_stop) {
$val = 'NULL';
}
if (isset($me_fields_null_prev) && isset($me_fields_null_prev[$encoded_key]) && !isset($me_fields_null[$encoded_key])) {
// The Null checkbox was unchecked for this field
if (empty($val) && isset($me_fields_null_prev) && isset($me_fields_null_prev[$encoded_key]) && !isset($me_fields_null[$encoded_key])) {
$val = "''";
}
} // end else (field value in the form)