From 71f9be3ed92d91c057a795162c0ca160248f0cca Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 19 May 2013 14:46:04 -0400 Subject: [PATCH] Fix double quoting issue in DB_MySQL_PDO::escape_string. (cherry picked from commit dee83410f06cbf0a2882fa0298250f88e438f2b1) --- framework/db_mysql_pdo.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/framework/db_mysql_pdo.php b/framework/db_mysql_pdo.php index dbbba6d..a9608a5 100755 --- a/framework/db_mysql_pdo.php +++ b/framework/db_mysql_pdo.php @@ -183,7 +183,10 @@ class DB_MySQL_PDO */ function escape_string($string) { - return $this->dblink->quote($string); + $q = $this->dblink->quote($string, PDO::PARAM_STR); + // This will put quotes arround the string, which is incompatible + // with how queries are written in Bugdar. Remove them here. + return substr($q, 1, -1); } // ################################################################### -- 2.22.5