[Vtigercrm-commits] [vtiger-commits] r7749 - /vtigercrm/trunk/include/utils/CommonUtils.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Tue Jul 4 03:19:24 EDT 2006


Author: saraj
Date: Tue Jul  4 01:19:20 2006
New Revision: 7749

Log:
* Modified to avoid the error when quote id is empty

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 Tue Jul  4 01:19:20 2006
@@ -463,9 +463,17 @@
 	$log->debug("Entering getQuoteName(".$quote_id.") method ...");
 	$log->info("in getQuoteName ".$quote_id);
         global $adb;
-        $sql = "select * from vtiger_quotes where quoteid=".$quote_id;
-        $result = $adb->query($sql);
-        $quote_name = $adb->query_result($result,0,"subject");
+	if($quote_id != NULL && $quote_id != '')
+	{
+        	$sql = "select * from vtiger_quotes where quoteid=".$quote_id;
+        	$result = $adb->query($sql);
+        	$quote_name = $adb->query_result($result,0,"subject");
+	}
+	else
+	{
+		$log->debug("Quote Id is empty.");
+		$quote_name = '';
+	}
 	$log->debug("Exiting getQuoteName method ...");
         return $quote_name;
 }





More information about the vtigercrm-commits mailing list