Index: branches/release-41/php/lib/mtdb_base.php
===================================================================
--- branches/release-41/php/lib/mtdb_base.php (revision 2606)
+++ branches/release-41/php/lib/mtdb_base.php (revision 2653)
@@ -3076,5 +3076,7 @@
                 foreach ($cfrow as $cffield => $cfvalue) {
                     if (preg_match("/^${field_prefix}v/", $cffield)) {
-                        if (isset($cfvalue)) {
+                        // FIXME: Some DBMS can't distinguish NULL from empty string.
+                        // Treat custom field that has empty string the same as field with no data.
+                        if (isset($cfvalue) && $cfvalue) {
                             $value = $cfvalue;
                             $field = $cffield;
