From 21dddb9e0106305878e34c476448b520a9b3bcc6 Mon Sep 17 00:00:00 2001 From: satish <satish.dvnk@vtiger.com> Date: Mon, 26 Jun 2017 11:39:00 +0530 Subject: [PATCH] Fixes #599 - db error when trying to add new mail scanner. --- modules/Settings/MailConverter/models/Record.php | 2 +- modules/Settings/MailConverter/models/RuleRecord.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/Settings/MailConverter/models/Record.php b/modules/Settings/MailConverter/models/Record.php index 43ec6f8d..da6ce6b6 100644 --- a/modules/Settings/MailConverter/models/Record.php +++ b/modules/Settings/MailConverter/models/Record.php @@ -328,7 +328,7 @@ class Settings_MailConverter_Record_Model extends Settings_Vtiger_Record_Model { */ public static function getInstanceById($recordId) { $db = PearDatabase::getInstance(); - $result = $db->pquery('SELECT * FROM vtiger_mailscanner WHERE scannerid = ', array($recordId)); + $result = $db->pquery('SELECT * FROM vtiger_mailscanner WHERE scannerid = ?', array($recordId)); if ($db->num_rows($result)) { $recordModel = self::getCleanInstance(); $recordModel->setData($db->query_result_rowdata($result)); diff --git a/modules/Settings/MailConverter/models/RuleRecord.php b/modules/Settings/MailConverter/models/RuleRecord.php index b1fce72e..443578f1 100644 --- a/modules/Settings/MailConverter/models/RuleRecord.php +++ b/modules/Settings/MailConverter/models/RuleRecord.php @@ -180,7 +180,7 @@ class Settings_MailConverter_RuleRecord_Model extends Settings_Vtiger_Record_Mod */ public static function getInstanceById($recordId) { $db = PearDatabase::getInstance(); - $result = $db->pquery('SELECT * FROM vtiger_mailscanner_rules WHERE ruleid = ', array($recordId)); + $result = $db->pquery('SELECT * FROM vtiger_mailscanner_rules WHERE ruleid = ?', array($recordId)); if ($db->num_rows($result)) { $recordModel = new self(); $recordModel->setData($db->query_result_rowdata($result)); -- GitLab