From dee83410f06cbf0a2882fa0298250f88e438f2b1 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. --- 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