Skip to content
Permalink
Browse files

Fix SQL when using operator SIMILAR TO

Fixes #1979
  • Loading branch information...
hirata authored and markstory committed Sep 8, 2011
1 parent 63902ab commit e86ae437960bb4614a400cfa1d8ea1d42b9df507
Showing with 2 additions and 2 deletions.
  1. +2 −2 cake/libs/model/datasources/dbo_source.php
@@ -2239,8 +2239,8 @@ function conditionKeysToString($conditions, $quoteValues = true, $model = null)
* @access private
*/
function __parseKey(&$model, $key, $value) {
$operatorMatch = '/^((' . implode(')|(', $this->__sqlOps);
$operatorMatch .= '\\x20)|<[>=]?(?![^>]+>)\\x20?|[>=!]{1,3}(?!<)\\x20?)/is';
$operatorMatch = '/^(((' . implode(')|(', $this->__sqlOps);
$operatorMatch .= ')\\x20?)|<[>=]?(?![^>]+>)\\x20?|[>=!]{1,3}(?!<)\\x20?)/is';
$bound = (strpos($key, '?') !== false || (is_array($value) && strpos($key, ':') !== false));
if (!strpos($key, ' ')) {

0 comments on commit e86ae43

Please sign in to comment.
You can’t perform that action at this time.