Permalink
Browse files

quoteIdentifier() & quoteIdentifierChain() bug

Identifier escaping is done means of doubling the delimiter character, and not using a backslash.
  • Loading branch information...
1 parent 1d12f86 commit 3ea563eac7fe300211e4c1ae41ecbe50301f9959 @JaredWilliams JaredWilliams committed Oct 4, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 library/Zend/Db/Adapter/Platform/Mysql.php
@@ -46,7 +46,7 @@ public function getQuoteIdentifierSymbol()
*/
public function quoteIdentifier($identifier)
{
- return '`' . str_replace('`', '\\' . '`', $identifier) . '`';
+ return '`' . str_replace('`', '``', $identifier) . '`';
}
/**
@@ -57,7 +57,7 @@ public function quoteIdentifier($identifier)
*/
public function quoteIdentifierChain($identifierChain)
{
- $identifierChain = str_replace('`', '\\`', $identifierChain);
+ $identifierChain = str_replace('`', '``', $identifierChain);
if (is_array($identifierChain)) {
$identifierChain = implode('`.`', $identifierChain);
}

0 comments on commit 3ea563e

Please sign in to comment.