Skip to content

Commit a0c26e2

Browse files
committed
fix: bug that caused $this->pregOperators to be assigned an incorrect value
1 parent b3d965f commit a0c26e2

1 file changed

Lines changed: 10 additions & 12 deletions

File tree

system/Database/BaseBuilder.php

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3397,20 +3397,18 @@ private function getOperatorFromWhereKey(string $whereKey)
33973397
{
33983398
$whereKey = trim($whereKey);
33993399

3400-
if ($this->pregOperators === []) {
3401-
$this->pregOperators = [
3402-
'\s*(?:<|>|!)?=', // =, <=, >=, !=
3403-
'\s*<>?', // <, <>
3404-
'\s*>', // >
3405-
'\s+IS NULL', // IS NULL
3406-
'\s+IS NOT NULL', // IS NOT NULL
3407-
'\s+LIKE', // LIKE
3408-
'\s+NOT LIKE', // NOT LIKE
3409-
];
3410-
}
3400+
$pregOperators = [
3401+
'\s*(?:<|>|!)?=', // =, <=, >=, !=
3402+
'\s*<>?', // <, <>
3403+
'\s*>', // >
3404+
'\s+IS NULL', // IS NULL
3405+
'\s+IS NOT NULL', // IS NOT NULL
3406+
'\s+LIKE', // LIKE
3407+
'\s+NOT LIKE', // NOT LIKE
3408+
];
34113409

34123410
return preg_match_all(
3413-
'/' . implode('|', $this->pregOperators) . '/i',
3411+
'/' . implode('|', $pregOperators) . '/i',
34143412
$whereKey,
34153413
$match
34163414
) ? $match[0] : false;

0 commit comments

Comments
 (0)