Changeset 2653

Show
Ignore:
Timestamp:
06/30/08 04:22:49 (12 months ago)
Author:
fumiakiy
Message:

Treat empty string and NULL the same for DBMS that can't distinguish the values in PHP. BugId:80349

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-41/php/lib/mtdb_base.php

    r2606 r2653  
    30763076                foreach ($cfrow as $cffield => $cfvalue) { 
    30773077                    if (preg_match("/^${field_prefix}v/", $cffield)) { 
    3078                         if (isset($cfvalue)) { 
     3078                        // FIXME: Some DBMS can't distinguish NULL from empty string. 
     3079                        // Treat custom field that has empty string the same as field with no data. 
     3080                        if (isset($cfvalue) && $cfvalue) { 
    30793081                            $value = $cfvalue; 
    30803082                            $field = $cffield;