- Fixed IN() query from Where rendering

This commit is contained in:
mcndave committed 2023-01-16 14:19:37 +00:00
1 parent b6752f4364
commit 43a913a602
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()