- Fixed a bug with the IN query

This commit is contained in:
Dave Mc Nicoll committed 2023-01-14 02:22:14 +00:00
1 parent 902167c2ed
commit 5ef20533b2
2 files changed
+6 -6

No files matched your search

+2 -2
View File
@@ -110,11 +110,11 @@ class Where extends Fragment {
protected function operator() : string
{
if ( is_array($this->value) ) {
return (in_array($this->operator, [ '!=', '<>' ]) ? Where::CONDITION_NOT . " " : "") . Where::COMPARISON_IN;
return Where::COMPARISON_IN;
}
# whitelisting operators
return in_array(strtoupper($this->operator), [ '=', '!=', '>', '>=', '<', '<=', '<>', 'LIKE', 'IS', 'IS NOT', 'REGEXP' ]) ? $this->operator : "=";
return in_array(strtoupper($this->operator), [ '=', '!=', '>', '>=', '<', '<=', '<>', 'LIKE', 'IS', 'IS NOT', 'REGEXP', 'IN' ]) ? $this->operator : "=";
}
protected function value()