[Vtigercrm-commits] [vtiger development] #6183: Numeric value of 0 in checkbox field (type 56) is converted to 1 when inserted to db

vtiger development vtiger-tickets at trac.vtiger.com
Tue Jul 21 08:38:42 EDT 2009


#6183: Numeric value of 0 in checkbox field (type 56) is converted to 1 when
inserted to db
------------------------+---------------------------------------------------
 Reporter:  R.Cohen     |       Owner:  developer
     Type:  defect      |      Status:  new      
 Priority:  unassigned  |   Milestone:  5.1.0    
Component:  vtigercrm   |     Version:  5.1.0-rc 
 Keywords:              |  
------------------------+---------------------------------------------------
 /data/CRMEntity.php

 Line 483 in function insertIntoEntityTable()


 {{{
 if($this->column_fields[$fieldname] == 'on' ||
 $this->column_fields[$fieldname] == 1)

 }}}
 PHP evaluates '''(0 == 'on')''' as '''true'''. Very dangerous considering
 this type is stored in db as 1 or 0.

-- 
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/6183>
vtiger development <http://trac.vtiger.com/>
vtigerCRM




More information about the vtigercrm-commits mailing list