mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Adding fix for #1928
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4393 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
c0c5a3e28c
commit
03d15ff892
1 changed files with 5 additions and 3 deletions
|
@ -1348,14 +1348,16 @@ class DboSource extends DataSource {
|
|||
|
||||
for($i = 0; $i < $pregCount; $i++) {
|
||||
if (!empty($match['1'][$i]) && !is_numeric($match['1'][$i])) {
|
||||
$conditions = preg_replace('/^' . $match['0'][$i] . '/', ' '.$this->name($match['1'][$i]), $conditions);
|
||||
$conditions = $conditions . ' ';
|
||||
$conditions = preg_replace('/^' . $match['0'][$i] . '(?=[^\\w])/', ' '.$this->name($match['1'][$i]), $conditions);
|
||||
if (strpos($conditions, '(' . $match['0'][$i]) === false) {
|
||||
$conditions = preg_replace('/[^\w]' . $match['0'][$i] . '/', ' '.$this->name($match['1'][$i]), $conditions);
|
||||
$conditions = preg_replace('/[^\w]' . $match['0'][$i] . '(?=[^\\w])/', ' '.$this->name($match['1'][$i]), $conditions);
|
||||
} else {
|
||||
$conditions = preg_replace('/' . $match['0'][$i] . '/', ' '.$this->name($match['1'][$i]), $conditions);
|
||||
$conditions = preg_replace('/' . $match['0'][$i] . '(?=[^\\w])/', ' '.$this->name($match['1'][$i]), $conditions);
|
||||
}
|
||||
}
|
||||
}
|
||||
$conditions = rtrim($conditions);
|
||||
}
|
||||
}
|
||||
return $clause . $conditions;
|
||||
|
|
Loading…
Add table
Reference in a new issue