[Vtigercrm-commits] [vtiger-commits] r4414 - /vtigercrm/trunk/include/utils/CommonUtils.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Fri Mar 24 02:52:56 EST 2006
Author: saraj
Date: Fri Mar 24 00:52:47 2006
New Revision: 4414
Log:
* Added condition to avoid the error when potentialid is empty in function getPotentialName
Modified:
vtigercrm/trunk/include/utils/CommonUtils.php
Modified: vtigercrm/trunk/include/utils/CommonUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/CommonUtils.php (original)
+++ vtigercrm/trunk/include/utils/CommonUtils.php Fri Mar 24 00:52:47 2006
@@ -331,12 +331,16 @@
function getPotentialName($potential_id)
{
global $log;
-$log->info("in getPotentialName ".$potential_id);
+ $log->info("in getPotentialName ".$potential_id);
global $adb;
- $sql = "select potentialname from potential where potentialid=".$potential_id;
- $result = $adb->query($sql);
- $potentialname = $adb->query_result($result,0,"potentialname");
+ $potentialname = '';
+ if($potential_id != '')
+ {
+ $sql = "select potentialname from potential where potentialid=".$potential_id;
+ $result = $adb->query($sql);
+ $potentialname = $adb->query_result($result,0,"potentialname");
+ }
return $potentialname;
}
More information about the vtigercrm-commits
mailing list