[Vtigercrm-commits] [vtiger development] #7176: ServiceContract.php uses !empty() where comparison to ZERO is required

vtiger development vtiger-tickets at trac.vtiger.com
Fri Oct 21 10:10:02 PDT 2011


#7176: ServiceContract.php uses !empty() where comparison to ZERO is required
------------------------+---------------------------------------------------
 Reporter:  gebhardt.p  |       Owner:  developer 
     Type:  defect      |      Status:  new       
 Priority:  unassigned  |   Milestone:  5.3.0     
Component:  vtigercrm   |     Version:  5.2.1     
 Severity:  Critical    |    Keywords:  empty,ZERO
------------------------+---------------------------------------------------
 $totalUnits was submitted as string "0.00" during Save and caused Divide
 by Zero error.

 [http://forums.vtiger.com/viewtopic.php?f=104&t=49842]

 Is changing line 572 to the following comparison sufficient to fix all
 potential cases?

 {{{
         if(!empty($usedUnits) && !empty($totalUnits) && ($totalUnits <>
 0)) {
 }}}

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



More information about the vtigercrm-commits mailing list