Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Delisle <marc@infomarc.info>2012-01-21 15:56:16 +0400
committerMarc Delisle <marc@infomarc.info>2012-01-21 15:56:16 +0400
commit346c70d6fd7a6e402e41dfd552f70e3bdaf83323 (patch)
tree930a18e99d64b2eaedb39e3bdda80a5e928f3387 /tbl_replace.php
parent5d1fa1cc6b9cd6b2a96a67cd79216354a3c3e77f (diff)
bug #3469254 [edit] Setting data to NULL and drop-downs
Diffstat (limited to 'tbl_replace.php')
-rw-r--r--tbl_replace.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/tbl_replace.php b/tbl_replace.php
index f7cc17c1b7..98d1b28fd4 100644
--- a/tbl_replace.php
+++ b/tbl_replace.php
@@ -218,6 +218,15 @@ foreach ($loop_array as $rownumber => $where_clause) {
if ($is_insert && $using_key && isset($me_fields_type) && is_array($me_fields_type) && isset($where_clause)) {
$prot_row = PMA_DBI_fetch_single_row('SELECT * FROM ' . PMA_backquote($table) . ' WHERE ' . $where_clause . ';');
}
+
+ // When a select field is nullified, it's not present in $_REQUEST
+ // so initialize it; this way, the foreach($me_fields) will process it
+ foreach ($me_fields_name as $key => $val) {
+ if (! isset($me_fields[$key])) {
+ $me_fields[$key] = '';
+ }
+ }
+
foreach ($me_fields as $key => $val) {
// Note: $key is an md5 of the fieldname. The actual fieldname is available in $me_fields_name[$key]